def test_django_simple_settings(self): """Test configuration of a simple backend""" backends = self._reload_backends() self.assertEqual(len(backends), 1) tracker.send({}) self.assertEqual(list(backends.values())[0].count, 1)
def test_django_simple_settings(self): """Test configuration of a simple backend""" backends = self._reload_backends() assert len(backends) == 1 tracker.send({}) assert list(backends.values())[0].count == 1
def test_django_multi_settings(self): """Test if multiple backends can be configured properly.""" backends = list(self._reload_backends().values()) self.assertEqual(len(backends), 2) event_count = 10 for _ in range(event_count): tracker.send({}) self.assertEqual(backends[0].count, event_count) self.assertEqual(backends[1].count, event_count)