When I used Mysql and MongoDB as my database at the same time, there was something wrong with using TestCase.

8 views
Skip to first unread message

Zhipeng Guan

unread,
Jan 17, 2019, 7:47:41 AM1/17/19
to Django users
I use MySQL as my default database, and I just used this database in unit tests.


But he used all my database connections while executing the "connections_support_transactions" function.

This caused all my data in MySQL initialization to be clear.

I modified the code of TestCase to this way.
https://gist.github.com/elfgzp/4b74a4b0860f3cecba17c56979e8e116

I want to know if this is a bug.

Reply all
Reply to author
Forward
0 new messages