summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2013-11-18 14:05:59 +0100
committerClaude Paroz <claude@2xlibre.net>2013-11-18 20:34:39 +0100
commit833f7d11e8f1d0171bac23e2e78c1111a83fbeaa (patch)
treefa1f8f3a79444e78b7f779594f984ae2c0cd951f /tests
parent62bb4fc8063b755be00c4f2a936292fc0bf067ca (diff)
[1.6.x] Fixed #21457 -- Allowed fixture file name to contain dots
Thanks Keryn Knight for the report. Backport of 97ac22ebfc from master.
Diffstat (limited to 'tests')
-rw-r--r--tests/fixtures_regress/fixtures/path.containing.dots.json9
-rw-r--r--tests/fixtures_regress/tests.py8
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/fixtures_regress/fixtures/path.containing.dots.json b/tests/fixtures_regress/fixtures/path.containing.dots.json
new file mode 100644
index 0000000000..d62ac03fff
--- /dev/null
+++ b/tests/fixtures_regress/fixtures/path.containing.dots.json
@@ -0,0 +1,9 @@
+[
+ {
+ "pk": "1",
+ "model": "fixtures_regress.absolute",
+ "fields": {
+ "name": "Load Absolute Path Test"
+ }
+ }
+]
diff --git a/tests/fixtures_regress/tests.py b/tests/fixtures_regress/tests.py
index 58339c9280..9ce0337e67 100644
--- a/tests/fixtures_regress/tests.py
+++ b/tests/fixtures_regress/tests.py
@@ -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