diff --git a/conventions/tests/views/test_journal_view.py b/conventions/tests/views/test_journal_view.py index 1cb59f47e..c06cf6083 100644 --- a/conventions/tests/views/test_journal_view.py +++ b/conventions/tests/views/test_journal_view.py @@ -43,13 +43,14 @@ def test_create_journal_evenement(self): """ # login as superuser self.client.post(reverse("login"), {"username": "nicolas", "password": "12345"}) - response = self.client.post( self.target_path, { "action": "submit", "description": "Signé par le préfet", "type_evenement": TypeEvenement.RETOUR_PREFET, + "piece_jointe": "filename.jpg", + "piece_jointe_files": "", }, ) self.assertEqual(response.status_code, 200, msg="[ConventionJournalTests] ") @@ -60,6 +61,7 @@ def test_create_journal_evenement(self): self.assertIsNotNone(evenement) self.assertEqual(evenement.description, "Signé par le préfet") self.assertEqual(evenement.type_evenement, TypeEvenement.RETOUR_PREFET) + assert evenement.piece_jointe == '{"files": [], "text": "filename.jpg"}' def test_edit_journal_evenement(self): """ @@ -76,6 +78,8 @@ def test_edit_journal_evenement(self): "uuid": self.convention_75.evenements.first().uuid, "description": "Contact prélimiaire au préfet pour signature", "type_evenement": TypeEvenement.ECHANGE, + "piece_jointe": "filename_update.jpg", + "piece_jointe_files": "", }, ) self.assertEqual(response.status_code, 200, msg="[ConventionJournalTests] ") @@ -90,3 +94,4 @@ def test_edit_journal_evenement(self): "Contact prélimiaire au préfet pour signature", ) self.assertEqual(evenement.type_evenement, TypeEvenement.ECHANGE) + assert evenement.piece_jointe == '{"files": [], "text": "filename_update.jpg"}'