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:32:13 +0100
commit97ac22ebfca0a5b0759f495cc5d7bed3f9da6615 (patch)
tree1a7d320125c93f1932996ed2bd0b2745a5f8d671 /tests
parentbc0413cbc6fd472371e907f17303c5ddcc9b4642 (diff)
Fixed #21457 -- Allowed fixture file name to contain dots
Thanks Keryn Knight for the report.
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 4bfb45ea39..c5ef83bee0 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