Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jpush-api-python-client
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
钟尚武
jpush-api-python-client
Commits
d23878a5
Commit
d23878a5
authored
Jun 02, 2014
by
hupantingxue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API3.0 Client: update test cases;
parent
27619687
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
31 deletions
+0
-31
test_audience.py
tests/push/test_audience.py
+0
-31
No files found.
tests/push/test_audience.py
View file @
d23878a5
...
...
@@ -16,34 +16,3 @@ class TestAudience(unittest.TestCase):
for
selector
,
value
,
result
in
selectors
:
self
.
assertEqual
(
selector
(
value
),
result
)
def
test_invalid_device_selectors
(
self
):
selectors
=
(
(
jpush
.
device_token
,
'f'
*
63
),
(
jpush
.
device_token
,
'f'
*
65
),
(
jpush
.
device_token
,
'0123'
),
(
jpush
.
device_token
,
'X'
*
64
),
(
jpush
.
device_pin
,
'1234567'
),
(
jpush
.
device_pin
,
'x'
*
8
),
(
jpush
.
apid
,
'foobar'
),
(
jpush
.
apid
,
'074e84a2-9ed9-4eee-9ca4-cc597bfdbef33'
),
(
jpush
.
apid
,
'074e84a2-9ed9-4eee-9ca4-cc597bfdbef'
),
(
jpush
.
wns
,
'074e84a2-9ed9-4eee-9ca4-cc597bfdbef'
),
(
jpush
.
mpns
,
'074e84a2-9ed9-4eee-9ca4-cc597bfdbef'
),
)
for
selector
,
value
in
selectors
:
self
.
assertRaises
(
ValueError
,
selector
,
value
)
def
test_compound_selectors
(
self
):
self
.
assertEqual
(
jpush
.
or_
(
jpush
.
tag
(
'foo'
),
jpush
.
tag
(
'bar'
)),
{
'or'
:
[{
'tag'
:
'foo'
},
{
'tag'
:
'bar'
}]})
self
.
assertEqual
(
jpush
.
and_
(
jpush
.
tag
(
'foo'
),
jpush
.
tag
(
'bar'
)),
{
'and'
:
[{
'tag'
:
'foo'
},
{
'tag'
:
'bar'
}]})
self
.
assertEqual
(
jpush
.
not_
(
jpush
.
tag
(
'foo'
)),
{
'not'
:
{
'tag'
:
'foo'
}})
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