From 02bc523b89ae6fb37c26ce8d6424cb84751ad3ac Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sun, 27 Nov 2011 10:31:26 +0000 Subject: [PATCH] Renamed the fixtures used by the aggregation tests so they're only loaded by the tests that use them. Refs #17275. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17153 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- .../fixtures/{initial_data.json => aggregation.json} | 0 tests/modeltests/aggregation/tests.py | 2 +- .../fixtures/{initial_data.json => aggregation_regress.json} | 0 tests/regressiontests/aggregation_regress/tests.py | 2 ++ 4 files changed, 3 insertions(+), 1 deletion(-) rename tests/modeltests/aggregation/fixtures/{initial_data.json => aggregation.json} (100%) rename tests/regressiontests/aggregation_regress/fixtures/{initial_data.json => aggregation_regress.json} (100%) diff --git a/tests/modeltests/aggregation/fixtures/initial_data.json b/tests/modeltests/aggregation/fixtures/aggregation.json similarity index 100% rename from tests/modeltests/aggregation/fixtures/initial_data.json rename to tests/modeltests/aggregation/fixtures/aggregation.json diff --git a/tests/modeltests/aggregation/tests.py b/tests/modeltests/aggregation/tests.py index 6c1c608d80..a35dbb345f 100644 --- a/tests/modeltests/aggregation/tests.py +++ b/tests/modeltests/aggregation/tests.py @@ -10,7 +10,7 @@ from .models import Author, Publisher, Book, Store class BaseAggregateTestCase(TestCase): - fixtures = ["initial_data.json"] + fixtures = ["aggregation.json"] def test_empty_aggregate(self): self.assertEqual(Author.objects.all().aggregate(), {}) diff --git a/tests/regressiontests/aggregation_regress/fixtures/initial_data.json b/tests/regressiontests/aggregation_regress/fixtures/aggregation_regress.json similarity index 100% rename from tests/regressiontests/aggregation_regress/fixtures/initial_data.json rename to tests/regressiontests/aggregation_regress/fixtures/aggregation_regress.json diff --git a/tests/regressiontests/aggregation_regress/tests.py b/tests/regressiontests/aggregation_regress/tests.py index 1498f19312..36a54c0b17 100644 --- a/tests/regressiontests/aggregation_regress/tests.py +++ b/tests/regressiontests/aggregation_regress/tests.py @@ -13,6 +13,8 @@ from .models import Author, Book, Publisher, Clues, Entries, HardbackBook class AggregationTests(TestCase): + fixtures = ["aggregation_regress.json"] + def assertObjectAttrs(self, obj, **kwargs): for attr, value in kwargs.iteritems(): self.assertEqual(getattr(obj, attr), value)