@@ -192,13 +192,14 @@ def assertSuccess(self, **kwargs):
192192 self .session .expire (self .user )
193193 self .session .expire (self .contest )
194194
195- authenticated_participation , cookie = \
195+ authenticated_participation , cookie , impersonated = \
196196 self .attempt_authentication (** kwargs )
197197
198198 self .assertIsNotNone (authenticated_participation )
199199 self .assertIs (authenticated_participation , self .participation )
200200 self .assertIs (authenticated_participation .user , self .user )
201201 self .assertIs (authenticated_participation .contest , self .contest )
202+ self .assertIs (impersonated , False )
202203
203204 return cookie
204205
@@ -223,10 +224,11 @@ def assertSuccessAndCookieCleared(self, **kwargs):
223224 def assertFailure (self , ** kwargs ):
224225 # Assert that the authentication fails.
225226 # The arguments are the same as those of attempt_authentication.
226- authenticated_participation , cookie = \
227+ authenticated_participation , cookie , impersonated = \
227228 self .attempt_authentication (** kwargs )
228229 self .assertIsNone (authenticated_participation )
229230 self .assertIsNone (cookie )
231+ self .assertIs (impersonated , False )
230232
231233 @patch .object (config , "cookie_duration" , 10 )
232234 def test_cookie_contains_timestamp (self ):
0 commit comments