Commit 43674607 by Calen Pennington

Merge pull request #12668 from cpennington/test-tracker-global-settings

Use copies of tracker settings dicts in tests so that changes don't l…
parents b9a38db6 3207311e
...@@ -61,7 +61,7 @@ class TestTrackerInstantiation(TestCase): ...@@ -61,7 +61,7 @@ class TestTrackerInstantiation(TestCase):
class TestTrackerDjangoInstantiation(TestCase): class TestTrackerDjangoInstantiation(TestCase):
"""Test if backends are initialized properly from Django settings.""" """Test if backends are initialized properly from Django settings."""
@override_settings(TRACKING_BACKENDS=SIMPLE_SETTINGS) @override_settings(TRACKING_BACKENDS=SIMPLE_SETTINGS.copy())
def test_django_simple_settings(self): def test_django_simple_settings(self):
"""Test configuration of a simple backend""" """Test configuration of a simple backend"""
...@@ -73,7 +73,7 @@ class TestTrackerDjangoInstantiation(TestCase): ...@@ -73,7 +73,7 @@ class TestTrackerDjangoInstantiation(TestCase):
self.assertEqual(backends.values()[0].count, 1) self.assertEqual(backends.values()[0].count, 1)
@override_settings(TRACKING_BACKENDS=MULTI_SETTINGS) @override_settings(TRACKING_BACKENDS=MULTI_SETTINGS.copy())
def test_django_multi_settings(self): def test_django_multi_settings(self):
"""Test if multiple backends can be configured properly.""" """Test if multiple backends can be configured properly."""
...@@ -88,7 +88,7 @@ class TestTrackerDjangoInstantiation(TestCase): ...@@ -88,7 +88,7 @@ class TestTrackerDjangoInstantiation(TestCase):
self.assertEqual(backends[0].count, event_count) self.assertEqual(backends[0].count, event_count)
self.assertEqual(backends[1].count, event_count) self.assertEqual(backends[1].count, event_count)
@override_settings(TRACKING_BACKENDS=MULTI_SETTINGS) @override_settings(TRACKING_BACKENDS=MULTI_SETTINGS.copy())
def test_django_remove_settings(self): def test_django_remove_settings(self):
"""Test if a backend can be remove by setting it to None.""" """Test if a backend can be remove by setting it to None."""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment