Attributeerror 'module' Object Has No Attribute 'runserver' In Django
I have a functional test 'y1.py' which I am trying to call from within a python/django function. Inside the calling function I have: import unittest import ft1.y1 unittest.main(mod
Solution 1:
Are you trying to run unitest and selenium from a view? You should consider launching a second process for that. This gives you better separation between your django modules and tested modules. If you insist on using unittest.main(), pass the argv and exit params.
import sys
unittest.main(module=ft.gtest, argv=sys.argv[:1], exit=False)
See also:
(Edited)
Post a Comment for "Attributeerror 'module' Object Has No Attribute 'runserver' In Django"