且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

嗅探器找不到DJANGO_SETTINGS_MODULE

更新时间:2022-04-05 08:50:25

类似于scent.py的内容应该可以正常工作:

Something like the following as your scent.py should work:

from subprocess import call
from sniffer.api import runnable

@runnable
def execute_tests(*args):
    fn = [ 'python', 'manage.py', 'test' ]
    fn += args[1:]
    return call(fn) == 0

然后您可以用sniffer -x appName呼叫.