更新时间:2023-09-09 19:40:04
Adam Chainz的答案frmo django-mysql库:
Answer from Adam Chainz frmo django-mysql library:
在提交之前,InnoDB不会对全文索引进行更改.您可以使用TransactionTestCase来解决此问题.
InnoDB doesn't make changes to full text indexes until commits. You can use TransactionTestCase to get around this.
我将测试类更改为使用TransactionTestCase
,现在测试通过了.
I change the test class to use TransactionTestCase
and the tests now pass.