Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
wangzijia authored and wangzijia committed Jul 14, 2022
1 parent c99fb5c commit 53f78a9
Show file tree
Hide file tree
Showing 39 changed files with 1,474 additions and 710 deletions.
Binary file modified .DS_Store
Binary file not shown.
20 changes: 4 additions & 16 deletions ApiTest/test.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
import requests

url = "http://www.baidu.com"

payload= (
("a","1"),
("a","2"),
("a","3"),
("b","5"),
)

print(payload)


files=[
a = "abc" # a是临时变量

]
headers = {
'Cookie': 'BAIDUID=6C6C6030F1690FD7425DECAAA7BB547E:FG=1; BDSVRTM=0'
}
d = '{"key": "##a##" }' #d 是刚从数据库取出来的header 的json

response = requests.request("POST", url, headers=headers, data=payload, files=files)
new_d = d.replace("##a##",repr(str(a)))

print(response.request.body)
print(new_d)
21 changes: 16 additions & 5 deletions ApiTest/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
Including another URLconf
Including another URLtconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
Expand Down Expand Up @@ -54,6 +54,12 @@
url(r'^add_case/(?P<eid>.*)/$', add_case), # 增加用例
url(r'^del_case/(?P<eid>.*)/(?P<oid>.*)/$', del_case), # 删除用例
url(r'^copy_case/(?P<eid>.*)/(?P<oid>.*)/$', copy_case), # 复制用例
url(r'^save_case_concurrent/$',save_case_concurrent),# 保存用例并发设置

url(r'^concurrent_cases/(?P<pid>.*)/$', concurrent_cases), # 用例并发
url(r'^look_concurrent_report/(?P<pid>.*)/$', look_concurrent_report), # 查看用例并发报告
url(r'^get_step_report/$',get_step_report), #获取具体step数据

url(r'^get_small/$', get_small), # 获取小用例步骤的列表数据
url(r'^user_upload/$', user_upload), # 上传头像
url(r'^add_new_step/$', add_new_step), # 新增小步骤接口
Expand All @@ -78,11 +84,16 @@
url(r'^global_data_save/$', global_data_save), # 保存一个全局变量组
url(r'^global_data_change_check/$', global_data_change_check), # 更改项目的生效变量组

url(r'^encyption_save/$',encyption_save), #加密配置保存

url(r'^cert_upload/(?P<pid>.*)/$', cert_upload), # 上传证书


# ------------ 测试用接口
url(r'^test_login_A/$', test_login_A), # 保存一个全局变量组
url(r'^test_login_B/$', test_login_B), # 保存一个全局变量组
url(r'^test_api_A/$', test_api_A), # 保存一个全局变量组
url(r'^test_api_B/$', test_api_B), # 保存一个全局变量组
url(r'^test_login_A/$', test_login_A),
url(r'^test_login_B/$', test_login_B),
url(r'^test_api_A/$', test_api_A),
url(r'^test_api_B/$', test_api_B),

# ------------ 小工具 --------------- #
url(r'^tools_zhengjiao/$', zhengjiao), # 进入小公举页面
Expand Down
Binary file added MyApp/.DS_Store
Binary file not shown.
18 changes: 5 additions & 13 deletions MyApp/admin.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
from django.contrib import admin

# Register your models here.
from MyApp.models import *

admin.site.register(DB_tucao)
admin.site.register(DB_home_href)
admin.site.register(DB_project)
admin.site.register(DB_apis)
admin.site.register(DB_apis_log)
admin.site.register(DB_cases)
admin.site.register(DB_step)
admin.site.register(DB_project_header)
admin.site.register(DB_host)
admin.site.register(DB_project_host)
admin.site.register(DB_login)
admin.site.register(DB_global_data)
import inspect,sys

clsmemebers = inspect.getmembers(sys.modules[__name__],inspect.isclass)
for name,cls in clsmemebers:
admin.site.register(cls)
18 changes: 18 additions & 0 deletions MyApp/migrations/0029_db_project_encryption.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.2 on 2021-06-21 07:52

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('MyApp', '0028_db_project_global_datas'),
]

operations = [
migrations.AddField(
model_name='db_project',
name='encryption',
field=models.CharField(max_length=500, null=True),
),
]
23 changes: 23 additions & 0 deletions MyApp/migrations/0030_auto_20210625_1749.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 2.2 on 2021-06-25 09:49

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('MyApp', '0029_db_project_encryption'),
]

operations = [
migrations.RenameField(
model_name='db_project',
old_name='encryption',
new_name='encyption_input',
),
migrations.AddField(
model_name='db_project',
name='encyption_insert',
field=models.CharField(max_length=50, null=True),
),
]
28 changes: 28 additions & 0 deletions MyApp/migrations/0031_auto_20210706_1112.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 2.2 on 2021-07-06 03:12

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('MyApp', '0030_auto_20210625_1749'),
]

operations = [
migrations.AddField(
model_name='db_step',
name='sign',
field=models.BooleanField(default=False),
),
migrations.AlterField(
model_name='db_apis',
name='sign',
field=models.BooleanField(default=False),
),
migrations.AlterField(
model_name='db_login',
name='sign',
field=models.BooleanField(default=False),
),
]
28 changes: 28 additions & 0 deletions MyApp/migrations/0032_auto_20210706_1204.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 2.2 on 2021-07-06 04:04

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('MyApp', '0031_auto_20210706_1112'),
]

operations = [
migrations.AlterField(
model_name='db_apis',
name='sign',
field=models.CharField(max_length=10, null=True),
),
migrations.AlterField(
model_name='db_login',
name='sign',
field=models.CharField(max_length=10, null=True),
),
migrations.AlterField(
model_name='db_step',
name='sign',
field=models.CharField(max_length=10, null=True),
),
]
28 changes: 28 additions & 0 deletions MyApp/migrations/0033_auto_20210706_1205.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 2.2 on 2021-07-06 04:05

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('MyApp', '0032_auto_20210706_1204'),
]

operations = [
migrations.AlterField(
model_name='db_apis',
name='sign',
field=models.CharField(default='no', max_length=10, null=True),
),
migrations.AlterField(
model_name='db_login',
name='sign',
field=models.CharField(default='no', max_length=10, null=True),
),
migrations.AlterField(
model_name='db_step',
name='sign',
field=models.CharField(default='no', max_length=10, null=True),
),
]
18 changes: 18 additions & 0 deletions MyApp/migrations/0034_db_project_cert.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.2 on 2021-08-18 10:46

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('MyApp', '0033_auto_20210706_1205'),
]

operations = [
migrations.AddField(
model_name='db_project',
name='cert',
field=models.CharField(default='', max_length=200, null=True),
),
]
33 changes: 33 additions & 0 deletions MyApp/migrations/0035_auto_20210819_1035.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated by Django 2.2 on 2021-08-19 02:35

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('MyApp', '0034_db_project_cert'),
]

operations = [
migrations.AddField(
model_name='db_apis',
name='api_cert',
field=models.CharField(max_length=10, null=True),
),
migrations.AddField(
model_name='db_apis_log',
name='api_cert',
field=models.CharField(max_length=10, null=True),
),
migrations.AddField(
model_name='db_login',
name='cert',
field=models.CharField(default='no', max_length=10, null=True),
),
migrations.AddField(
model_name='db_step',
name='api_cert',
field=models.CharField(max_length=10, null=True),
),
]
28 changes: 28 additions & 0 deletions MyApp/migrations/0036_auto_20210819_1321.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 2.2 on 2021-08-19 05:21

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('MyApp', '0035_auto_20210819_1035'),
]

operations = [
migrations.RenameField(
model_name='db_apis',
old_name='api_cert',
new_name='cert',
),
migrations.RenameField(
model_name='db_apis_log',
old_name='api_cert',
new_name='cert',
),
migrations.RenameField(
model_name='db_step',
old_name='api_cert',
new_name='cert',
),
]
18 changes: 18 additions & 0 deletions MyApp/migrations/0037_db_cases_concurrent.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.2 on 2021-11-03 07:21

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('MyApp', '0036_auto_20210819_1321'),
]

operations = [
migrations.AddField(
model_name='db_cases',
name='concurrent',
field=models.BooleanField(default=True),
),
]
23 changes: 23 additions & 0 deletions MyApp/migrations/0038_db_wqrf_step_report.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 2.2 on 2022-03-25 16:26

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('MyApp', '0037_db_cases_concurrent'),
]

operations = [
migrations.CreateModel(
name='DB_wqrf_step_report',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('step_id', models.CharField(default='', max_length=10)),
('request_data', models.TextField(default='{}')),
('response', models.TextField(default='')),
('assert_result', models.CharField(default='{}', max_length=500)),
],
),
]
Loading

0 comments on commit 53f78a9

Please sign in to comment.