GitHub:https://github.com/yjlch1016/dmock
# dmock
基于Django的轻量级Mock平台
dmock即Django+Mock的缩写
一、思路:
mock测试是人主观上预置某种响应结果,
而不是客观上存在这种响应结果。
同一个接口路径,
分别预置不同的入参,
会返回不同的出参。
接口表一对多场景表。
二、本地安装调试:
新建dmcok数据库:
python manage.py collectstatic
复制静态文件
python manage.py makemigrations
激活模型
python manage.py migrate
迁移
python manage.py createsuperuser
创建超级管理员账号
账号:admin
邮箱:123456789@qq.com
密码:test123456
python manage.py runserver
本地启动服务
访问: