Fixed test in auth_tests modifying data from setUpTestData().
This commit is contained in:
parent
6e4a34580d
commit
18dd9ba481
|
@ -79,7 +79,7 @@ class SignalTestCase(TestCase):
|
||||||
user.username = "This username shouldn't get saved"
|
user.username = "This username shouldn't get saved"
|
||||||
request = RequestFactory().get('/login')
|
request = RequestFactory().get('/login')
|
||||||
signals.user_logged_in.send(sender=user.__class__, request=request, user=user)
|
signals.user_logged_in.send(sender=user.__class__, request=request, user=user)
|
||||||
user.refresh_from_db()
|
user = User.objects.get(pk=user.pk)
|
||||||
self.assertEqual(user.username, 'staff')
|
self.assertEqual(user.username, 'staff')
|
||||||
self.assertNotEqual(user.last_login, old_last_login)
|
self.assertNotEqual(user.last_login, old_last_login)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue