From d7231e60f2aaa2f05d98fa0dd51f8018c10c77ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Fri, 7 Dec 2018 21:06:30 +0100 Subject: [PATCH] Fixed Test --- tests/integration/motions/test_viewset.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/integration/motions/test_viewset.py b/tests/integration/motions/test_viewset.py index 171b5abb0..0462c775b 100644 --- a/tests/integration/motions/test_viewset.py +++ b/tests/integration/motions/test_viewset.py @@ -633,11 +633,10 @@ class ManageMultipleSubmitters(TestCase): text='test_text_kg39KFGm,ao)22FK9lLu') self.motion2.save() - @pytest.mark.skip(reason="This throws an json validation error I'm not sure about") def test_set_submitters(self): response = self.client.post( reverse('motion-manage-multiple-submitters'), - { + json.dumps({ 'motions': [ { 'id': self.motion1.id, @@ -652,14 +651,15 @@ class ManageMultipleSubmitters(TestCase): ] } ] - }) - print(response.data['detail']) + }), + content_type='application/json' + ) self.assertEqual(response.status_code, 200) self.assertEqual(self.motion1.submitters.count(), 1) self.assertEqual(self.motion2.submitters.count(), 1) self.assertEqual( - self.motion1.submitters.get().pk, - self.motion2.submitters.get().pk) + self.motion1.submitters.get().user.pk, + self.motion2.submitters.get().user.pk) def test_non_existing_user(self): response = self.client.post(