@@ -36,6 +36,7 @@ def test_edit_profile(self):
36
36
},
37
37
)
38
38
self .assertTrue (resp .status_code , 200 )
39
+ self .assertEqual (resp ["Location" ], "/accounts/edit/" )
39
40
40
41
self .user .refresh_from_db ()
41
42
self .user .profile .refresh_from_db ()
@@ -195,32 +196,32 @@ def test_list_security_logs(self):
195
196
resp = self .client .get (reverse ('profiles_security_log' ))
196
197
self .assertEqual (resp .status_code , 200 )
197
198
auditlogs = resp .context_data ['object_list' ]
198
- self .assertQuerysetEqual (auditlogs , queryset )
199
+ self .assertQuerySetEqual (auditlogs , queryset )
199
200
200
201
# Show logs filtered by project.
201
202
resp = self .client .get (reverse ('profiles_security_log' ) + '?project=project' )
202
203
self .assertEqual (resp .status_code , 200 )
203
204
auditlogs = resp .context_data ["object_list" ]
204
- self .assertQuerysetEqual (auditlogs , queryset .filter (log_project_slug = "project" ))
205
+ self .assertQuerySetEqual (auditlogs , queryset .filter (log_project_slug = "project" ))
205
206
206
207
# Show logs filtered by IP.
207
208
ip = "10.10.10.2"
208
209
resp = self .client .get (reverse ("profiles_security_log" ) + f"?ip={ ip } " )
209
210
self .assertEqual (resp .status_code , 200 )
210
211
auditlogs = resp .context_data ['object_list' ]
211
- self .assertQuerysetEqual (auditlogs , queryset .filter (ip = ip ))
212
+ self .assertQuerySetEqual (auditlogs , queryset .filter (ip = ip ))
212
213
213
214
# Show logs filtered by action.
214
215
resp = self .client .get (reverse ('profiles_security_log' ) + '?action=authentication' )
215
216
self .assertEqual (resp .status_code , 200 )
216
217
auditlogs = resp .context_data ['object_list' ]
217
- self .assertQuerysetEqual (auditlogs , queryset .filter (action = AuditLog .AUTHN ))
218
+ self .assertQuerySetEqual (auditlogs , queryset .filter (action = AuditLog .AUTHN ))
218
219
219
220
# Show logs filtered by action.
220
221
resp = self .client .get (reverse ('profiles_security_log' ) + '?action=authentication-failure' )
221
222
self .assertEqual (resp .status_code , 200 )
222
223
auditlogs = resp .context_data ["object_list" ]
223
- self .assertQuerysetEqual (
224
+ self .assertQuerySetEqual (
224
225
auditlogs , queryset .filter (action = AuditLog .AUTHN_FAILURE )
225
226
)
226
227
@@ -235,7 +236,7 @@ def test_list_security_logs(self):
235
236
resp = self .client .get (reverse ('profiles_security_log' ) + '?action=invalid' )
236
237
self .assertEqual (resp .status_code , 200 )
237
238
auditlogs = resp .context_data ['object_list' ]
238
- self .assertQuerysetEqual (auditlogs , queryset )
239
+ self .assertQuerySetEqual (auditlogs , queryset )
239
240
240
241
241
242
@override_settings (
0 commit comments