diff --git a/tests/modeltests/fixtures/fixtures/invalid.json b/tests/modeltests/fixtures/fixtures/invalid.json index 97121ca84f..fb69f7c949 100644 --- a/tests/modeltests/fixtures/fixtures/invalid.json +++ b/tests/modeltests/fixtures/fixtures/invalid.json @@ -3,8 +3,8 @@ "pk": "1", "model": "fixtures.article", "fields": { - "headline": null, - "pub_date": "2006-06-16 13:00:00" + "headline": "Breaking news", + "pub_date": null } } ] diff --git a/tests/modeltests/fixtures/tests.py b/tests/modeltests/fixtures/tests.py index 16c5bfe0d7..2dca7ced9c 100644 --- a/tests/modeltests/fixtures/tests.py +++ b/tests/modeltests/fixtures/tests.py @@ -269,7 +269,7 @@ class FixtureLoadingTests(TestCase): new_io = StringIO.StringIO() management.call_command('loaddata', 'invalid.json', verbosity=0, stderr=new_io, commit=False) output = new_io.getvalue().strip().split('\n') - self.assertRegexpMatches(output[-1], "IntegrityError: Could not load fixtures.Article\(pk=1\): .*$") + self.assertRegexpMatches(output[-1], "Error: Could not load fixtures.Article\(pk=1\): .*$") def test_loading_using(self): # Load db fixtures 1 and 2. These will load using the 'default' database identifier explicitly