diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py index 595e19e5e6..40d75b58e4 100644 --- a/django/core/management/commands/loaddata.py +++ b/django/core/management/commands/loaddata.py @@ -327,7 +327,7 @@ class Command(BaseCommand): else: raise CommandError( "Problem installing fixture '%s': %s is not a known " - "serialization format." % (''.join(parts[:-1]), parts[-1])) + "serialization format." % ('.'.join(parts[:-1]), parts[-1])) else: ser_fmt = None diff --git a/tests/fixtures_regress/fixtures/bad_fixture1.unkn b/tests/fixtures_regress/fixtures/bad_fix.ture1.unkn similarity index 100% rename from tests/fixtures_regress/fixtures/bad_fixture1.unkn rename to tests/fixtures_regress/fixtures/bad_fix.ture1.unkn diff --git a/tests/fixtures_regress/tests.py b/tests/fixtures_regress/tests.py index 83b007bf59..1cac151367 100644 --- a/tests/fixtures_regress/tests.py +++ b/tests/fixtures_regress/tests.py @@ -182,11 +182,11 @@ class TestFixtures(TestCase): Test for ticket #4371 -- Loading data of an unknown format should fail Validate that error conditions are caught correctly """ - msg = "Problem installing fixture 'bad_fixture1': unkn is not a known serialization format." + msg = "Problem installing fixture 'bad_fix.ture1': unkn is not a known serialization format." with self.assertRaisesMessage(management.CommandError, msg): management.call_command( 'loaddata', - 'bad_fixture1.unkn', + 'bad_fix.ture1.unkn', verbosity=0, ) @@ -198,7 +198,7 @@ class TestFixtures(TestCase): with self.assertRaisesMessage(ImportError, "No module named 'unexistent'"): management.call_command( 'loaddata', - 'bad_fixture1.unkn', + 'bad_fix.ture1.unkn', verbosity=0, )