The Python Oracle

TransactionManagementError "You can't execute queries until the end of the 'atomic' block" while using signals, but only during Unit Testing

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Mysterious Puzzle

--

Chapters
00:00 Question
03:06 Accepted answer (Score 325)
04:31 Answer 2 (Score 61)
05:02 Answer 3 (Score 17)
05:51 Answer 4 (Score 10)
06:08 Thank you

--

Full question
https://stackoverflow.com/questions/2145...

Question links:
[django TransactionManagementError when using signals]: https://stackoverflow.com/questions/2013...

Answer 1 links:
[his comment]: https://stackoverflow.com/questions/2145...
[Django docs]: https://docs.djangoproject.com/en/3.1/to...

Answer 2 links:
https://pytest-django.readthedocs.io/en/...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #django #unittesting #djangosignals

#avk47