diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2019-11-05 23:06:55 -0800 |
---|---|---|
committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2019-11-06 08:06:55 +0100 |
commit | 92e5abd7a3dbbea88b3d43d5790f94e276bc6dff (patch) | |
tree | f54588abc71856aaaefa8fecd93648ec9cd968b4 /tests/fixtures_regress | |
parent | 89368ab6e358ebe29a0417d65209182238daa245 (diff) | |
download | django-92e5abd7a3dbbea88b3d43d5790f94e276bc6dff.tar.gz |
Refs #29983 -- Added test for FIXTURES_DIRS pathlib support.
Diffstat (limited to 'tests/fixtures_regress')
-rw-r--r-- | tests/fixtures_regress/tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/fixtures_regress/tests.py b/tests/fixtures_regress/tests.py index 1cac151367..cc4cee3de4 100644 --- a/tests/fixtures_regress/tests.py +++ b/tests/fixtures_regress/tests.py @@ -3,6 +3,7 @@ import json import os import re from io import StringIO +from pathlib import Path from django.core import management, serializers from django.core.exceptions import ImproperlyConfigured @@ -517,6 +518,11 @@ class TestFixtures(TestCase): verbosity=0, ) + @override_settings(FIXTURE_DIRS=[Path(_cur_dir) / 'fixtures_1']) + def test_fixtures_dir_pathlib(self): + management.call_command('loaddata', 'inner/absolute.json', verbosity=0) + self.assertQuerysetEqual(Absolute.objects.all(), [1], transform=lambda o: o.pk) + class NaturalKeyFixtureTests(TestCase): |