From 0149323b793c417a62e10eeb850793cec476a878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Thu, 26 Oct 2017 01:35:47 +0200 Subject: [PATCH] Fix profile test --- gestion/tests.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gestion/tests.py b/gestion/tests.py index 8cba796e..5e9c2fd7 100644 --- a/gestion/tests.py +++ b/gestion/tests.py @@ -79,14 +79,17 @@ class TestProfile(TestCase): "first_name": "foo", "last_name": "bar", "phone": "0123456789", - "departement": "baz" + "departement": "baz", + "occupation": "1A", } - c.post("/profile", post_data) + r = c.post("/profile/edit/", post_data) + self.assertRedirects(r, "/profile/") user = User.objects.get(username="root") self.assertEqual(user.first_name, post_data['first_name']) self.assertEqual(user.last_name, post_data["last_name"]) self.assertEqual(user.profile.phone, post_data["phone"]) self.assertEqual(user.profile.departement, post_data["departement"]) + self.assertEqual(user.profile.occupation, post_data["occupation"]) class AuthTest(TestCase):