Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jk_interface_test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huangqiang
jk_interface_test
Commits
faa5ad9f
Commit
faa5ad9f
authored
Jun 25, 2021
by
刘琴
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'liuqin_Q1' into 'master'
Liuqin q1 See merge request
!6
parents
6aa46523
982db369
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
226 additions
and
14 deletions
+226
-14
misc.xml
.idea/misc.xml
+5
-0
workspace.xml
.idea/workspace.xml
+42
-12
run.py
run.py
+2
-2
__init__.py
...i_yun_ying_pc/service_education_liuqin/Common/__init__.py
+0
-0
helpler.py
...ji_yun_ying_pc/service_education_liuqin/Common/helpler.py
+76
-0
__init__.py
script/ji_yun_ying_pc/service_education_liuqin/__init__.py
+0
-0
Course_Data.py
...pc/service_education_liuqin/courses_liuqin/Course_Data.py
+101
-0
__init__.py
...ng_pc/service_education_liuqin/courses_liuqin/__init__.py
+0
-0
test_case_course.py
...rvice_education_liuqin/courses_liuqin/test_case_course.py
+0
-0
No files found.
.idea/misc.xml
View file @
faa5ad9f
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<<<<<<
< HEAD
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"Python 3.7 (jk_interface_test) (2)"
project-jdk-type=
"Python SDK"
/>
=======
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"Python 3.7 (jk_interface_test) (3)"
project-jdk-type=
"Python SDK"
/>
>>>>>>> 99f36b935c809d3f930d37a6d8d797cb54a831c8
</project>
\ No newline at end of file
.idea/workspace.xml
View file @
faa5ad9f
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<<<<<<
< HEAD
<list
default=
"true"
id=
"ceb24b37-65a1-4b3f-be3f-7040ebc4079d"
name=
"默认变更列表"
comment=
"默认变更列表"
>
<change
beforePath=
"$PROJECT_DIR$/.idea/jk_interface_test.iml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/jk_interface_test.iml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/misc.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/misc.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
=======
<list
default=
"true"
id=
"ceb24b37-65a1-4b3f-be3f-7040ebc4079d"
name=
"默认变更列表"
comment=
""
>
<change
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/service_education_liuqin/Common/__init__.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/service_education_liuqin/Common/helpler.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/service_education_liuqin/__init__.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/service_education_liuqin/courses_liuqin/Course_Data.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/service_education_liuqin/courses_liuqin/__init__.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/service_education_liuqin/courses_liuqin/test_case_course.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/jk_interface_test.iml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/jk_interface_test.iml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/misc.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/misc.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/run.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/run.py"
afterDir=
"false"
/>
>>>>>>> 99f36b935c809d3f930d37a6d8d797cb54a831c8
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
...
@@ -22,6 +36,11 @@
<option
name=
"BRANCH"
value=
"origin/liuqin_jyy"
/>
</component>
<component
name=
"Git.Settings"
>
<option
name=
"RECENT_BRANCH_BY_REPOSITORY"
>
<map>
<entry
key=
"$PROJECT_DIR$"
value=
"master"
/>
</map>
</option>
<option
name=
"RECENT_GIT_ROOT_PATH"
value=
"$PROJECT_DIR$"
/>
</component>
<component
name=
"GitSEFilterConfiguration"
>
...
...
@@ -45,10 +64,13 @@
<component
name=
"PropertiesComponent"
>
<property
name=
"RunOnceActivity.OpenProjectViewOnStart"
value=
"true"
/>
<property
name=
"RunOnceActivity.ShowReadmeOnStart"
value=
"true"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$"
/>
<property
name=
"settings.editor.selected.configurable"
value=
"
com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable
"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$
/script/ji_yun_ying_pc/service_education_liuqin/Common
"
/>
<property
name=
"settings.editor.selected.configurable"
value=
"
File.Encoding
"
/>
</component>
<component
name=
"RecentsManager"
>
<key
name=
"CopyFile.RECENT_KEYS"
>
<recent
name=
"D:\interface\jk_interface_test\script\ji_yun_ying_pc\service_education_liuqin\Common"
/>
</key>
<key
name=
"MoveFile.RECENT_KEYS"
>
<recent
name=
"$PROJECT_DIR$/script/ji_yun_ying_pc/mall/store_shopping_mall"
/>
<recent
name=
"$PROJECT_DIR$/tools"
/>
...
...
@@ -57,8 +79,8 @@
<recent
name=
"$PROJECT_DIR$/script/ding_ding_jdata/full_class_rate/assert_config"
/>
</key>
</component>
<component
name=
"RunManager"
selected=
"Python.run
_cmd
"
>
<configuration
name=
"
debug
"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<component
name=
"RunManager"
selected=
"Python.run"
>
<configuration
name=
"
Course_Data
"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<module
name=
"jk_interface_test"
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
<option
name=
"PARENT_ENVS"
value=
"true"
/>
...
...
@@ -66,11 +88,11 @@
<env
name=
"PYTHONUNBUFFERED"
value=
"1"
/>
</envs>
<option
name=
"SDK_HOME"
value=
""
/>
<option
name=
"WORKING_DIRECTORY"
value=
"$PROJECT_DIR$/
test
"
/>
<option
name=
"WORKING_DIRECTORY"
value=
"$PROJECT_DIR$/
script/ji_yun_ying_pc/service_education_liuqin/courses_liuqin
"
/>
<option
name=
"IS_MODULE_SDK"
value=
"true"
/>
<option
name=
"ADD_CONTENT_ROOTS"
value=
"true"
/>
<option
name=
"ADD_SOURCE_ROOTS"
value=
"true"
/>
<option
name=
"SCRIPT_NAME"
value=
"$PROJECT_DIR$/
test/debug
.py"
/>
<option
name=
"SCRIPT_NAME"
value=
"$PROJECT_DIR$/
script/ji_yun_ying_pc/service_education_liuqin/courses_liuqin/Course_Data
.py"
/>
<option
name=
"PARAMETERS"
value=
""
/>
<option
name=
"SHOW_COMMAND_LINE"
value=
"false"
/>
<option
name=
"EMULATE_TERMINAL"
value=
"false"
/>
...
...
@@ -79,7 +101,7 @@
<option
name=
"INPUT_FILE"
value=
""
/>
<method
v=
"2"
/>
</configuration>
<configuration
name=
"
init_base_api
"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<configuration
name=
"
helpler
"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<module
name=
"jk_interface_test"
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
<option
name=
"PARENT_ENVS"
value=
"true"
/>
...
...
@@ -87,11 +109,11 @@
<env
name=
"PYTHONUNBUFFERED"
value=
"1"
/>
</envs>
<option
name=
"SDK_HOME"
value=
""
/>
<option
name=
"WORKING_DIRECTORY"
value=
"$PROJECT_DIR$/
tools
"
/>
<option
name=
"WORKING_DIRECTORY"
value=
"$PROJECT_DIR$/
script/ji_yun_ying_pc/service_education_liuqin/Common
"
/>
<option
name=
"IS_MODULE_SDK"
value=
"true"
/>
<option
name=
"ADD_CONTENT_ROOTS"
value=
"true"
/>
<option
name=
"ADD_SOURCE_ROOTS"
value=
"true"
/>
<option
name=
"SCRIPT_NAME"
value=
"$PROJECT_DIR$/
tools/init_base_api
.py"
/>
<option
name=
"SCRIPT_NAME"
value=
"$PROJECT_DIR$/
script/ji_yun_ying_pc/service_education_liuqin/Common/helpler
.py"
/>
<option
name=
"PARAMETERS"
value=
""
/>
<option
name=
"SHOW_COMMAND_LINE"
value=
"false"
/>
<option
name=
"EMULATE_TERMINAL"
value=
"false"
/>
...
...
@@ -164,19 +186,27 @@
<method
v=
"2"
/>
</configuration>
<list>
<<<<<<
< HEAD
<item
itemvalue=
"Python.debug"
/>
<item
itemvalue=
"Python.init_base_api"
/>
<item
itemvalue=
"Python.run"
/>
<item
itemvalue=
"Python.run_cmd"
/>
<item
itemvalue=
"Python.url_to_method"
/>
=======
<item
itemvalue=
"Python.url_to_method"
/>
<item
itemvalue=
"Python.run"
/>
<item
itemvalue=
"Python.run_cmd"
/>
<item
itemvalue=
"Python.Course_Data"
/>
<item
itemvalue=
"Python.helpler"
/>
>>>>>>> 99f36b935c809d3f930d37a6d8d797cb54a831c8
</list>
<recent_temporary>
<list>
<item
itemvalue=
"Python.run_cmd"
/>
<item
itemvalue=
"Python.run"
/>
<item
itemvalue=
"Python.Course_Data"
/>
<item
itemvalue=
"Python.helpler"
/>
<item
itemvalue=
"Python.run_cmd"
/>
<item
itemvalue=
"Python.url_to_method"
/>
<item
itemvalue=
"Python.debug"
/>
<item
itemvalue=
"Python.init_base_api"
/>
</list>
</recent_temporary>
</component>
...
...
run.py
View file @
faa5ad9f
...
...
@@ -62,14 +62,14 @@ class RunTest:
if
__name__
==
'__main__'
:
case_path_list
=
[
"./script/ji_yun_ying_pc/s
ystem_set/test_basic_parameter_set.py::TestFullClassTargetSet
"
,
"./script/ji_yun_ying_pc/s
ervice_education_liuqin/courses_liuqin/test_case_course.py::TestCourse::test_create_course_with_all_condition_success
"
,
# "./script/ding_ding_jdata/person_time/test_person_time.py::TestsPersonTimeDetail::test_detail_page_search_date",
# "./script/ding_ding_jdata/person_time/test_person_time.py::TestsPersonTimeDetail::test_detail_page_search_target",
# "./script/ding_ding_jdata/person_time/test_person_time.py::TestsPersonTimeDetail::test_detail_page_search_subject",
]
# host = "https://geek.jkwljy.com"
# account_group = "线上"
host
=
"http://1
92.168.32.36
"
host
=
"http://1
72.10.62.93/
"
account_group
=
"A"
db_config
=
"36"
mongo_db_config
=
"36"
...
...
script/ji_yun_ying_pc/service_education_liuqin/Common/__init__.py
0 → 100644
View file @
faa5ad9f
script/ji_yun_ying_pc/service_education_liuqin/Common/helpler.py
0 → 100644
View file @
faa5ad9f
import
random
import
time
import
datetime
def
get_mobile
():
"""获取手机号"""
mobile
=
'1'
+
random
.
choice
([
'3'
,
'5'
,
'7'
,
'8'
,
'9'
])
for
i
in
range
(
9
):
num
=
random
.
randint
(
0
,
9
)
mobile
+=
str
(
num
)
return
mobile
def
get_time
():
# 获取当前时间cuo
ts
=
str
(
int
(
time
.
time
()))
return
ts
def
get_now_time
():
# 获取当前时间
now_time
=
time
.
strftime
(
"
%
Y-
%
m-
%
d
%
H_
%
M_
%
S"
)
return
now_time
def
get_tomorrow_datetime
():
# 获取明天日期
temp_date
=
datetime
.
datetime
.
now
()
# 获取当前时间 年月日时分秒
date1
=
(
temp_date
+
datetime
.
timedelta
(
days
=+
1
))
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
return
date1
def
get_today
():
# 获取今天
today
=
time
.
strftime
(
"
%
Y-
%
m-
%
d"
,
time
.
localtime
())
return
today
def
get_this_week
():
# 获取当前日期星期
now
=
datetime
.
datetime
.
now
()
this_week_start
=
now
-
datetime
.
timedelta
(
days
=
now
.
weekday
())
this_week_end
=
now
+
datetime
.
timedelta
(
days
=
6
-
now
.
weekday
())
week_start
=
this_week_start
.
strftime
(
"
%
Y-
%
m-
%
d"
)
week_end
=
this_week_end
.
strftime
(
"
%
Y-
%
m-
%
d"
)
return
{
'week_start'
:
week_start
,
'week_end'
:
week_end
}
def
get_this_month
():
# 获取当前日期月
now
=
datetime
.
datetime
.
now
()
this_month_start
=
datetime
.
datetime
(
now
.
year
,
now
.
month
,
1
)
this_month_end
=
datetime
.
datetime
(
now
.
year
,
now
.
month
+
1
,
1
)
-
datetime
.
timedelta
(
days
=
1
)
+
datetime
.
timedelta
(
hours
=
23
,
minutes
=
59
,
seconds
=
59
)
month_start
=
this_month_start
.
strftime
(
"
%
Y-
%
m-
%
d"
)
month_end
=
this_month_end
.
strftime
(
"
%
Y-
%
m-
%
d"
)
return
{
'month_start'
:
month_start
,
'month_end'
:
month_end
}
def
time_transform_day
(
change_time
):
# createTime: 1620387156 转换为2021-05-07 (时间戳转换为日期格式)
day
=
time
.
localtime
(
change_time
)
day
=
time
.
strftime
(
"
%
Y-
%
m-
%
d"
,
day
)
return
day
def
day_transform_time
(
change_time
):
# createTimeStr: "2021-05-07 19:32:36" 转换为 2021-05-07 (格式转换为日期格式)
timeStruct
=
time
.
strptime
(
change_time
,
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
timeStruct
=
time
.
strftime
(
"
%
Y-
%
m-
%
d"
,
timeStruct
)
return
timeStruct
if
__name__
==
'__main__'
:
print
(
get_now_time
())
# print(get_time())
# # print(get_tomorrow_datetime())
# # print(get_this_week())
# # print(get_this_month())
# print(time_transform_day(1620387156))
# print(day_transform_time("2021-05-07 19:32:36"))
script/ji_yun_ying_pc/service_education_liuqin/__init__.py
0 → 100644
View file @
faa5ad9f
script/ji_yun_ying_pc/service_education_liuqin/courses_liuqin/Course_Data.py
0 → 100644
View file @
faa5ad9f
import
random
from
decimal
import
Decimal
from
script.ji_yun_ying_pc.service_education_liuqin.Common.helpler
import
get_now_time
class
Add_My_New_Clue_isNotTerm
():
# 新增课程data,按课时收费
area
=
2382
schoolArea
=
2371
subject
=
(
"数学"
,
"语文"
,
"英语"
,
"物理"
,
"化学"
)
classType
=
(
"极趣班"
,
"极思班"
,
"极智班"
,
"极客班"
,
"极客A班"
,
"极客蓝队班"
,
"五四极趣班"
,
"五四极思班"
,
"五四极智班"
,
"新生"
,
"人教班"
,
"八人精品"
,
"定制班"
,
"五四极客班"
)
grade_list
=
[
'零年级'
,
'一年级'
,
'二年级'
,
'三年级'
,
'四年级'
,
'五年级'
,
'六年级'
,
'七年级'
,
'八年级'
,
'九年级'
,
'高一'
,
'高二'
,
'高三'
]
# "courseStatus": "2" 停用 "1" 启用
# "isNormal": 2 低价课程 1 正价课程
def
__init__
(
self
,
courseName
=
""
,
term
=
"暑"
,
subject
=
random
.
sample
(
subject
,
1
)[
0
],
productType
=
""
,
year
=
2021
,
classType
=
random
.
sample
(
classType
,
1
)[
0
],
grade
=
random
.
sample
(
grade_list
,
1
)[
0
],
coursePeriod
=
"4"
,
courseType
=
"常规班课"
,
courseNumber
=
"2"
,
normalPrice
=
"15"
,
coursePrice
=
"15"
,
courseStatus
=
"1"
,
teachForm
=
"offline"
,
courseDesc
=
""
,
priceType
=
1
,
isTerm
=
False
,
perPeriodDuration
=
1
,
isNormal
=
1
,
schools
=
[{
"area"
:
area
,
"schoolArea"
:
schoolArea
}],
cContent
=
[]
):
courseName
=
"【面授】{}{}{}{}[lq]{}"
.
format
(
term
,
grade
,
subject
,
classType
,
get_now_time
())
self
.
init_course_data
=
[
{
"courseName"
:
courseName
,
"term"
:
term
,
"subject"
:
subject
,
"productType"
:
productType
,
"year"
:
year
,
"classType"
:
classType
,
"grade"
:
grade
,
"coursePeriod"
:
coursePeriod
,
"courseType"
:
courseType
,
"courseNumber"
:
courseNumber
,
"normalPrice"
:
normalPrice
,
"coursePrice"
:
coursePrice
,
"courseStatus"
:
courseStatus
,
"teachForm"
:
teachForm
,
"courseDesc"
:
courseDesc
,
"priceType"
:
priceType
,
"isTerm"
:
isTerm
,
"perPeriodDuration"
:
perPeriodDuration
,
"isNormal"
:
isNormal
,
"totalPrice"
:
float
(
coursePeriod
)
*
float
(
coursePrice
),
"registerGrade"
:
grade
,
"schools"
:
schools
,
"cContent"
:
cContent
}]
class
Add_My_New_Clue_isTerm
():
# 新增课程data,按期收费
area
=
2382
schoolArea
=
2371
subject
=
(
"数学"
,
"语文"
,
"英语"
,
"物理"
,
"化学"
)
classType
=
(
"极趣班"
,
"极思班"
,
"极智班"
,
"极客班"
,
"极客A班"
,
"极客蓝队班"
,
"五四极趣班"
,
"五四极思班"
,
"五四极智班"
,
"新生"
,
"人教班"
,
"八人精品"
,
"定制班"
,
"五四极客班"
)
grade_list
=
[
'零年级'
,
'一年级'
,
'二年级'
,
'三年级'
,
'四年级'
,
'五年级'
,
'六年级'
,
'七年级'
,
'八年级'
,
'九年级'
,
'高一'
,
'高二'
,
'高三'
]
def
__init__
(
self
,
courseName
=
""
,
term
=
"暑"
,
subject
=
random
.
sample
(
subject
,
1
)[
0
],
productType
=
""
,
year
=
2021
,
classType
=
random
.
sample
(
classType
,
1
)[
0
],
grade
=
random
.
sample
(
grade_list
,
1
)[
0
],
coursePeriod
=
"3"
,
courseType
=
"常规班课"
,
courseNumber
=
"3"
,
normalPrice
=
"100"
,
courseStatus
=
"1"
,
teachForm
=
"offline"
,
totalPrice
=
"44"
,
courseDesc
=
""
,
priceType
=
2
,
perPeriodDuration
=
1
,
isNormal
=
1
,
schools
=
[{
"area"
:
area
,
"schoolArea"
:
schoolArea
}],
cContent
=
[]
):
courseName
=
"【面授】{}{}{}{}[lq按期]{}"
.
format
(
term
,
grade
,
subject
,
classType
,
get_now_time
())
self
.
init_course_data
=
[
{
"courseName"
:
courseName
,
"term"
:
term
,
"subject"
:
subject
,
"productType"
:
productType
,
"year"
:
year
,
"classType"
:
classType
,
"grade"
:
grade
,
"coursePeriod"
:
coursePeriod
,
"courseType"
:
courseType
,
"courseNumber"
:
courseNumber
,
"normalPrice"
:
normalPrice
,
"coursePrice"
:
'{:.2f}'
.
format
(
float
(
Decimal
(
totalPrice
)
/
Decimal
(
coursePeriod
))),
"courseStatus"
:
courseStatus
,
"teachForm"
:
teachForm
,
"courseDesc"
:
courseDesc
,
"priceType"
:
priceType
,
"perPeriodDuration"
:
perPeriodDuration
,
"isNormal"
:
isNormal
,
"totalPrice"
:
totalPrice
,
"registerGrade"
:
grade
,
"schools"
:
schools
,
"cContent"
:
cContent
}]
if
__name__
==
'__main__'
:
totalPrice
=
Decimal
(
"44"
)
coursePeriod
=
Decimal
(
"3"
)
print
(
type
(
str
(
totalPrice
/
coursePeriod
)))
script/ji_yun_ying_pc/service_education_liuqin/courses_liuqin/__init__.py
0 → 100644
View file @
faa5ad9f
script/ji_yun_ying_pc/service_education_liuqin/courses_liuqin/test_case_course.py
0 → 100644
View file @
faa5ad9f
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment