forked from DGNum/gestioCOF
assertEquals is deprecated
This commit is contained in:
parent
177d413f4c
commit
0e1ff1765a
1 changed files with 5 additions and 5 deletions
|
@ -31,7 +31,7 @@ class TestHomeView(TestCase):
|
||||||
user, backend="django.contrib.auth.backends.ModelBackend"
|
user, backend="django.contrib.auth.backends.ModelBackend"
|
||||||
)
|
)
|
||||||
resp = self.client.get(reverse("bds:home"))
|
resp = self.client.get(reverse("bds:home"))
|
||||||
self.assertEquals(resp.status_code, 200)
|
self.assertEqual(resp.status_code, 200)
|
||||||
|
|
||||||
|
|
||||||
class TestRegistrationView(TestCase):
|
class TestRegistrationView(TestCase):
|
||||||
|
@ -48,12 +48,12 @@ class TestRegistrationView(TestCase):
|
||||||
# Logged-in but unprivileged GET
|
# Logged-in but unprivileged GET
|
||||||
client.force_login(user, backend="django.contrib.auth.backends.ModelBackend")
|
client.force_login(user, backend="django.contrib.auth.backends.ModelBackend")
|
||||||
resp = client.get(url)
|
resp = client.get(url)
|
||||||
self.assertEquals(resp.status_code, 403)
|
self.assertEqual(resp.status_code, 403)
|
||||||
|
|
||||||
# Burô user GET
|
# Burô user GET
|
||||||
give_bds_buro_permissions(user)
|
give_bds_buro_permissions(user)
|
||||||
resp = client.get(url)
|
resp = client.get(url)
|
||||||
self.assertEquals(resp.status_code, 200)
|
self.assertEqual(resp.status_code, 200)
|
||||||
|
|
||||||
@mock.patch("gestioncof.signals.messages")
|
@mock.patch("gestioncof.signals.messages")
|
||||||
def test_get(self, mock_messages):
|
def test_get(self, mock_messages):
|
||||||
|
@ -68,9 +68,9 @@ class TestRegistrationView(TestCase):
|
||||||
# Logged-in but unprivileged GET
|
# Logged-in but unprivileged GET
|
||||||
client.force_login(user, backend="django.contrib.auth.backends.ModelBackend")
|
client.force_login(user, backend="django.contrib.auth.backends.ModelBackend")
|
||||||
resp = client.get(url)
|
resp = client.get(url)
|
||||||
self.assertEquals(resp.status_code, 403)
|
self.assertEqual(resp.status_code, 403)
|
||||||
|
|
||||||
# Burô user GET
|
# Burô user GET
|
||||||
give_bds_buro_permissions(user)
|
give_bds_buro_permissions(user)
|
||||||
resp = client.get(url)
|
resp = client.get(url)
|
||||||
self.assertEquals(resp.status_code, 200)
|
self.assertEqual(resp.status_code, 200)
|
||||||
|
|
Loading…
Reference in a new issue