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:
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"pk": "1",
|
||||
"model": "fixtures_regress.absolute",
|
||||
"fields": {
|
||||
"name": "Load Absolute Path Test"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user