def test_no_html_emitted_if_not_enabled(self):
     result_html = google_analytics_tracking_pixel(self.context)
     self.assertEqual('', result_html)
    def test_missing_message(self):
        del self.context['message']

        with self.assertRaises(VariableDoesNotExist):
            google_analytics_tracking_pixel(self.context)
 def test_html_emitted(self):
     result_html = google_analytics_tracking_pixel(self.context)
     self.assertIn('<img src', result_html)
    def test_missing_request(self):
        self.mock_get_current_request.return_value = None

        with self.assertRaises(VariableDoesNotExist):
            google_analytics_tracking_pixel(self.context)
예제 #5
0
 def test_no_html_emitted_if_not_enabled(self):
     result_html = google_analytics_tracking_pixel(self.context)
     self.assertEqual('', result_html)
예제 #6
0
 def test_html_emitted(self):
     result_html = google_analytics_tracking_pixel(self.context)
     self.assertIn('<img src', result_html)
예제 #7
0
    def test_missing_message(self):
        del self.context['message']

        with self.assertRaises(VariableDoesNotExist):
            google_analytics_tracking_pixel(self.context)
예제 #8
0
    def test_missing_request(self):
        self.mock_get_current_request.return_value = None

        with self.assertRaises(VariableDoesNotExist):
            google_analytics_tracking_pixel(self.context)