Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

django单元测试求解 #28

Open
raul275 opened this issue Jan 9, 2018 · 1 comment
Open

django单元测试求解 #28

raul275 opened this issue Jan 9, 2018 · 1 comment

Comments

@raul275
Copy link

raul275 commented Jan 9, 2018

您好,我这边开发了一个Django的工程,正常运行都没问题,最近想添加一些单元测试的例子,我在运行python manage.py test命令后,每次都会提示我tablespace 'TEST_XXX' already exists,然后就让我选择是删除重建还是退出,我选择删除重建后可以顺利进行了,但是到最后会提示table or view not exist,我在网上查了些资料,有人说单测的时候需要保证每个model的managed=True,但是因为我的model都是从数据库中反向生成的,默认就是False,我手动改成True之后同样报错,请帮忙解答下,万分感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@raul275 and others