1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

[1.6.x] Fixed #21457 -- Allowed fixture file name to contain dots

Thanks Keryn Knight for the report.
Backport of 97ac22ebfc from master.
This commit is contained in:
Claude Paroz
2013-11-18 14:05:59 +01:00
parent 62bb4fc806
commit 833f7d11e8
4 changed files with 27 additions and 9 deletions

View File

@@ -0,0 +1,9 @@
[
{
"pk": "1",
"model": "fixtures_regress.absolute",
"fields": {
"name": "Load Absolute Path Test"
}
}
]

View File

@@ -165,6 +165,14 @@ class TestFixtures(TestCase):
os.chdir(cwd)
self.assertEqual(Absolute.objects.count(), 1)
def test_path_containing_dots(self):
management.call_command(
'loaddata',
'path.containing.dots.json',
verbosity=0,
)
self.assertEqual(Absolute.objects.count(), 1)
def test_unknown_format(self):
"""
Test for ticket #4371 -- Loading data of an unknown format should fail