Fixed #24978 -- Escaped special characters in loaddata fixture paths

This commit is contained in:
Moritz Sichert 2015-06-13 12:20:05 +02:00 committed by Tim Graham
parent d58573e60d
commit 98df288dda
5 changed files with 68 additions and 1 deletions

View file

@ -224,6 +224,10 @@ class FixtureLoadingTests(DumpDataAssertMixin, TestCase):
"Unknown model in excludes: fixtures.FooModel"):
self._dumpdata_assert(['fixtures', 'sites'], '', exclude_list=['fixtures.FooModel'])
def test_load_fixture_with_special_characters(self):
management.call_command('loaddata', 'fixture?with[special]chars*', verbosity=0)
self.assertQuerysetEqual(Article.objects.all(), ['<Article: How To Deal With Special Characters>'])
def test_dumpdata_with_filtering_manager(self):
spy1 = Spy.objects.create(name='Paul')
spy2 = Spy.objects.create(name='Alex', cover_blown=True)