@@ -724,7 +724,7 @@ def test_get_instruction_batch(self):
724724 if 'token' in resjson :
725725 del resjson ['token' ]
726726 self .assertEquals (resjson , {'instructions' : data ,
727- 'correction' : data_correction })
727+ 'correction' : data_correction })
728728
729729 def test_get_instruction_batch_no_correction (self ):
730730 data = self .batch_data ()
@@ -756,7 +756,7 @@ def test_get_instruction_batch_limit(self):
756756 if 'token' in resjson :
757757 del resjson ['token' ]
758758 self .assertEquals (resjson , {'instructions' : data [0 :2 ],
759- 'correction' : data_correction })
759+ 'correction' : data_correction })
760760
761761 route = '/instructions/batch?limit=3'
762762 r = self .client .get (route )
@@ -766,7 +766,7 @@ def test_get_instruction_batch_limit(self):
766766 if 'token' in resjson :
767767 del resjson ['token' ]
768768 self .assertEquals (resjson , {'instructions' : data ,
769- 'correction' : data_correction })
769+ 'correction' : data_correction })
770770
771771 route = '/instructions/batch?limit=10'
772772 r = self .client .get (route )
@@ -776,7 +776,7 @@ def test_get_instruction_batch_limit(self):
776776 if 'token' in resjson :
777777 del resjson ['token' ]
778778 self .assertEquals (resjson , {'instructions' : data ,
779- 'correction' : data_correction })
779+ 'correction' : data_correction })
780780
781781 def test_get_instruction_batch_limit_invalid (self ):
782782 data = self .batch_data ()
@@ -1028,6 +1028,10 @@ def get_challenge_token(self):
10281028 self .route = '/instructions/batch'
10291029 r = self .client .get (self .route )
10301030 self .assertEquals (r .status_code , 200 )
1031+
1032+ if 'token' not in r .json :
1033+ return None
1034+
10311035 token = r .json ['token' ]
10321036 self .assertEquals (len (token ), 10 )
10331037 return token
@@ -1067,10 +1071,8 @@ def test_post_verify_auth_receiver(self):
10671071 def test_post_verify_error_wrong_state (self ):
10681072 self .setup_delivery ()
10691073 self .change_delivery_state ("IN_QUEUE" )
1070- bearer = self .login ("foo2" , "bar2" )
10711074 token = self .get_challenge_token ()
1072- r = self .execute_challenge (token , bearer )
1073- self .assertEquals (r .status_code , 400 )
1075+ self .assertEquals (token , None )
10741076
10751077 def test_post_verify_error_wrong_token (self ):
10761078 self .setup_delivery ()
0 commit comments