fix tests

new behavior introduced in 82aba755b8
This commit is contained in:
Élie Bouttier 2016-07-23 13:00:11 +02:00
parent 8385a9501a
commit 7c43d693fe
1 changed files with 2 additions and 1 deletions

View File

@ -55,11 +55,12 @@ class AccountTests(TestCase):
b.save()
p = Participation.objects.get(user=b)
self.assertFalse(p.orga)
self.assertEqual(self.client.get(reverse('list-participant')).status_code, 200)
self.assertEqual(self.client.get(reverse('list-participant')).status_code, 403)
# login signal should set orga to True due to superuser status
self.client.login(username='b', password='b')
p = Participation.objects.get(user=b)
self.assertTrue(p.orga)
self.assertEqual(self.client.get(reverse('list-participant')).status_code, 200)
self.assertEqual(self.client.post(reverse('edit-participant', kwargs={'username': 'a'}),
{'biography': 'foo', 'nootes': 'bar'}).status_code, 200)
self.assertEqual(User.objects.get(username='a').profile.biography, '')