def test_get_allowed(self):
     """
     MultiCharterSuccessView should be successfull if referrer is recognized
     """
     self.request.META["HTTP_REFERER"] = reverse("tracking:multi_charter_event_add")
     response = MultiCharterSuccessView.as_view()(self.request)
     self.assertEqual(response.status_code, 200)
 def test_get_no_allowed(self):
     """
     MultiCharterSuccessView should redirect to home page if referrer is not recognized
     """
     self.request.META["HTTP_REFERER"] = "wrong/url"
     response = MultiCharterSuccessView.as_view()(self.request)
     self.assertEqual(response.status_code, 302)
     self.assertEqual(response.url, reverse("tracking:project_list"))
 def test_get_no_allowed(self):
     """
     MultiCharterSuccessView should redirect to home page if referrer is not recognized
     """
     self.request.META["HTTP_REFERER"] = "wrong/url"
     response = MultiCharterSuccessView.as_view()(self.request)
     self.assertEqual(response.status_code, 302)
     self.assertEqual(response.url, reverse("tracking:project_list"))
 def test_get_allowed(self):
     """
     MultiCharterSuccessView should be successfull if referrer is recognized
     """
     self.request.META["HTTP_REFERER"] = reverse(
         "tracking:multi_charter_event_add")
     response = MultiCharterSuccessView.as_view()(self.request)
     self.assertEqual(response.status_code, 200)