Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
alpha-earth-interface
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
刘丙寅
alpha-earth-interface
Commits
33168f2b
Commit
33168f2b
authored
Sep 23, 2019
by
刘丙寅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
topic提交
parent
2d8995c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
9 deletions
+69
-9
case_pictorial.py
case/case_pictorial.py
+69
-9
No files found.
case/case_pictorial.py
View file @
33168f2b
...
...
@@ -3,7 +3,7 @@ import unittest
from
param
import
params
from
login
import
case_login
from
case
import
ge
tMethod
from
case
import
asser
tMethod
class
Case
(
unittest
.
TestCase
):
...
...
@@ -21,6 +21,10 @@ class Case(unittest.TestCase):
info
=
params
.
info
pictorial_and_topic
=
params
.
pictorial_and_topic
pictorial_search
=
params
.
pictorial_search
pictorial_update
=
params
.
pictorial_update
pictorial_detail
=
params
.
pictorial_detail
pictorial_h5_invite
=
params
.
pictorial_h5_invite
pictorial_invite
=
params
.
pictorial_invite
@classmethod
def
setUpClass
(
cls
):
# 调用登陆类 传入会话保持,进行赋值
...
...
@@ -34,14 +38,14 @@ class Case(unittest.TestCase):
p
=
"earth榜单活动信息接口"
url
=
self
.
uri
+
self
.
pictorial_info
result
=
self
.
s
.
get
(
url
=
url
)
getMethod
.
getmethod
(
p
,
result
)
assertMethod
.
getmethod
(
p
,
result
)
def
test_02
(
self
):
'earth榜单活动卡片接口'
p
=
"earth榜单活动卡片接口"
url
=
self
.
uri
+
self
.
pictorial_list
result
=
self
.
s
.
get
(
url
=
url
)
getMethod
.
getmethod
(
p
,
result
)
assertMethod
.
getmethod
(
p
,
result
)
def
test_03
(
self
):
...
...
@@ -49,7 +53,7 @@ class Case(unittest.TestCase):
p
=
"榜单默认内容(换一换)接口"
url
=
self
.
uri
+
self
.
default_content
result
=
self
.
s
.
get
(
url
=
url
)
getMethod
.
getmethod
(
p
,
result
)
assertMethod
.
getmethod
(
p
,
result
)
def
test_03
(
self
):
'画报信息接口'
...
...
@@ -60,21 +64,21 @@ class Case(unittest.TestCase):
pictorial_id
=
"316139"
url
=
self
.
uri
+
self
.
info
+
"?pictorial_id="
+
pictorial_id
result
=
self
.
s
.
get
(
url
=
url
)
getMethod
.
getmethod
(
p
,
result
)
assertMethod
.
getmethod
(
p
,
result
)
def
test_04
(
self
):
'画报卡片'
p
=
"画报卡片接口01"
url
=
self
.
uri
+
self
.
pictorial_card
+
"use_type=1"
result
=
self
.
s
.
get
(
url
=
url
)
getMethod
.
getmethod
(
p
,
result
)
assertMethod
.
getmethod
(
p
,
result
)
def
test_05
(
self
):
'画报卡片'
p
=
"画报卡片接口02"
url
=
self
.
uri
+
self
.
pictorial_card
+
"use_type=2"
result
=
self
.
s
.
get
(
url
=
url
)
getMethod
.
getmethod
(
p
,
result
)
assertMethod
.
getmethod
(
p
,
result
)
def
test_06
(
self
):
'画报帖子添加关系接口'
...
...
@@ -91,7 +95,7 @@ class Case(unittest.TestCase):
}
url
=
self
.
uri
+
self
.
pictorial_and_topic
result
=
self
.
s
.
post
(
url
=
url
,
data
=
body
)
getMethod
.
getmethod
(
p
,
result
)
assertMethod
.
getmethod
(
p
,
result
)
def
test_07
(
self
):
...
...
@@ -103,7 +107,63 @@ class Case(unittest.TestCase):
name
=
"明星"
url
=
self
.
uri
+
self
.
pictorial_search
+
"?name="
+
name
result
=
self
.
s
.
get
(
url
=
url
)
getMethod
.
getmethod
(
p
,
result
)
assertMethod
.
getmethod
(
p
,
result
)
def
test_08
(
self
):
'画报更新'
p
=
"画报更新"
if
self
.
uri
==
self
.
test_uri
:
body
=
{
"pictorial_id"
:
286487
,
"desc"
:
"测试修改数据"
}
if
self
.
uri
==
self
.
master_uri
:
body
=
{
"pictorial_id"
:
316535
,
"desc"
:
"美白,更美你"
}
url
=
self
.
uri
+
self
.
pictorial_update
result
=
self
.
s
.
post
(
url
=
url
,
data
=
body
)
assertMethod
.
getmethod
(
p
,
result
)
def
test_09
(
self
):
'画报详情'
p
=
"画报详情"
if
self
.
uri
==
self
.
test_uri
:
pictorial_id
=
"286487"
if
self
.
uri
==
self
.
master_uri
:
pictorial_id
=
"316535"
url
=
self
.
uri
+
self
.
pictorial_detail
+
"?pictorial_id="
+
pictorial_id
result
=
self
.
s
.
get
(
url
=
url
)
assertMethod
.
getmethod
(
p
,
result
)
def
test_10
(
self
):
'画报邀请H5'
p
=
"画报邀请H5"
if
self
.
uri
==
self
.
test_uri
:
pictorial_id
=
"286487"
user_id
=
""
if
self
.
uri
==
self
.
master_uri
:
pictorial_id
=
"316535"
user_id
=
"241408085"
url
=
self
.
uri
+
self
.
pictorial_h5_invite
+
"?"
+
"pictorial_id="
+
pictorial_id
+
"&"
+
"user_id="
+
user_id
result
=
self
.
s
.
get
(
url
=
url
)
assertMethod
.
getmethod
(
p
,
result
)
def
test_11
(
self
):
'画报邀请页'
p
=
"画报邀请页"
if
self
.
uri
==
self
.
test_uri
:
pictorial_id
=
"286487"
if
self
.
uri
==
self
.
master_uri
:
pictorial_id
=
"316535"
url
=
self
.
uri
+
self
.
pictorial_invite
+
"?pictorial_id="
+
pictorial_id
result
=
self
.
s
.
get
(
url
=
url
)
assertMethod
.
getmethod
(
p
,
result
)
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