Esempio n. 1
0
 def setUp(self):
     options = {
         'property_id': 'UA-12573345-12',
         'client_id': 'd944d45c-9c92-46a2-97be-9ba07d922227',
     }
     self.connection = GoogleAnalytics(options)
     self.driver = Error(options, self.connection)
Esempio n. 2
0
class TestError(TestCase):

    def setUp(self):
        options = {
            'property_id': 'UA-12573345-12',
            'client_id': 'd944d45c-9c92-46a2-97be-9ba07d922227',
        }
        self.connection = GoogleAnalytics(options)
        self.driver = Error(options, self.connection)

    def test_send(self):
        response = self.driver.send(
            description='A test error intentionally generated by a test case.'
        )

        self.assertEqual(response.status_code, 200)
        self.assertIn('exd', response.json)
        self.assertIn('exf', response.json)