Exemplo n.º 1
0
 def test_issuer_can_post_a_message(self):
     organisation = OrganisationRequestFactory(
         status=RequestStatusConstants.AC_VALIDATION_PROCESSING.name
     )
     response = self.client.get(organisation.get_absolute_url())
     self.assertNotContains(response, "Bonjour bonjour")
     self.client.post(
         organisation.get_absolute_url(), {"content": "Bonjour bonjour"}
     )
     response = self.client.get(organisation.get_absolute_url())
     self.assertContains(response, "Bonjour bonjour")
Exemplo n.º 2
0
 def test_correct_message_is_shown_when_empty_messages_history(self):
     organisation = OrganisationRequestFactory(
         status=RequestStatusConstants.AC_VALIDATION_PROCESSING.name
     )
     response = self.client.get(organisation.get_absolute_url())
     self.assertContains(response, "Notre conversation démarre ici.")
     self.client.post(
         organisation.get_absolute_url(), {"content": "Bonjour bonjour"}
     )
     response = self.client.get(organisation.get_absolute_url())
     self.assertNotContains(response, "Notre conversation démarre ici.")
Exemplo n.º 3
0
 def test_no_redirect_on_confirmed_organisation_request(self):
     organisation = OrganisationRequestFactory(
         status=RequestStatusConstants.AC_VALIDATION_PROCESSING.name
     )
     response = self.client.get(organisation.get_absolute_url())
     self.assertEqual(response.status_code, 200)
     self.assertContains(response, organisation.name)
     self.assertContains(
         response, RequestStatusConstants.AC_VALIDATION_PROCESSING.value
     )