{{{
from django.test.testcases import TestCase
class EmployeesTestCase(TestCase):
fixtures = [
'capps/accounts/fixtures/tests',
'capps/locations/fixtures/tests',
'capps/companies/fixtures/tests',
'employees/fixtures/tests',
]
...
}}}
Everything is fine except one thing: sometimes testcase fails with error
**json.decoder.JSONDecodeError: Problem installing fixture**.
Here's the link to the video demonstrating the issue
https://youtu.be/GqMarU0_XW0
Tried with both Django 3.2.2 and 3.2.3, with python 3.8.9 and 3.9.5, with
PostgreSQL 13 and SQLite 3.
All fixtures were created by {{{python manage.py dumpdata }}}.
This is the case for all apps in my project, it either loads data, or
fails to do so without any change from my side.
Can someone please explain what kind of black magic is this?
--
Ticket URL: <https://code.djangoproject.com/ticket/32756>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Alexandr Bezenkov):
NOTE: also tried **yaml** and **jsonl** formats, the error is the same
even if I try
{{{
from django.test.testcases import TestCase
class EmployeesTestCase(TestCase):
fixtures = [
'capps/accounts/fixtures/tests.yaml',
'capps/locations/fixtures/tests.yaml',
'capps/companies/fixtures/tests.yaml',
'employees/fixtures/tests.yaml',
]
...
}}}
And yes everything worked with Django 2.2.23.
--
Ticket URL: <https://code.djangoproject.com/ticket/32756#comment:1>
* status: new => closed
* resolution: => invalid
Comment:
Nevermind, it was post save signal that messed with the actual import.
--
Ticket URL: <https://code.djangoproject.com/ticket/32756#comment:2>