• current_url方法获取当前URL跟预期比较一下就行了

  • 你好,clone下来部署的时候python manage.py makemigrations的时候提示如下报错,请问是缺少了什么必要参数,没找到这个参数

    D:\testcenter>python manage.py makemigrations
    Traceback (most recent call last):
    File "manage.py", line 23, in <module>
    execute_from_command_line(sys.argv)
    File "D:\application\python35\lib\site-packages\django-2.1-py3.5.egg\django\core\management\__init__.py", line 381, in execute_from_command_line
    utility.execute()
    File "D:\application\python35\lib\site-packages\django-2.1-py3.5.egg\django\core\management\__init__.py", line 357, in execute
    django.setup()
    File "D:\application\python35\lib\site-packages\django-2.1-py3.5.egg\django\__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
    File "D:\application\python35\lib\site-packages\django-2.1-py3.5.egg\django\apps\registry.py", line 112, in populate
    app_config.import_models()
    File "D:\application\python35\lib\site-packages\django-2.1-py3.5.egg\django\apps\config.py", line 198, in import_models
    self.models_module = import_module(models_module_name)
    File "D:\application\python35\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 986, in _gcd_import
    File "<frozen importlib._bootstrap>", line 969, in _find_and_load
    File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 673, in exec_module
    File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
    File "D:\testcenter\apitest\models.py", line 13, in <module>
    class TestSuite(models.Model):
    File "D:\testcenter\apitest\models.py", line 18, in TestSuite
    project_id = models.ForeignKey(TestProject, blank=True, null=True)
    TypeError: __init__() missing 1 required positional argument: 'on_delete'


  • 好的谢谢,我研究研究,之前一直习惯用discover方法批量执行的,只能通过用例的命名来调整顺序

  • 我有个问题请教,最近做的接口测试是读取excel写的用例的,读取的时候是按照行列读取的,一共接近100个接口,几百条测试用例,即使按照模块分了几张表,但是一旦中间添加了用例,后面的行顺序就都变了,改起来麻烦