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
c61a0d02
Commit
c61a0d02
authored
Jun 20, 2014
by
wuliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless files;
parent
7dcabe17
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
78 deletions
+0
-78
__init__.py
tests/__init__.py
+0
-0
__init__.py
tests/push/__init__.py
+0
-0
test_audience.py
tests/push/test_audience.py
+0
-18
test_message.py
tests/push/test_message.py
+0
-33
test_push.py
tests/push/test_push.py
+0
-27
No files found.
tests/__init__.py
deleted
100644 → 0
View file @
7dcabe17
tests/push/__init__.py
deleted
100644 → 0
View file @
7dcabe17
tests/push/test_audience.py
deleted
100644 → 0
View file @
7dcabe17
import
unittest
import
sys
sys
.
path
.
append
(
'../..'
)
import
jpush
as
jpush
class
TestAudience
(
unittest
.
TestCase
):
def
test_basic_selectors
(
self
):
selectors
=
(
(
jpush
.
tag
,
'test'
,
{
'tag'
:
'test'
}),
(
jpush
.
tag_and
,
'test'
,
{
'tag_and'
:
'test'
}),
(
jpush
.
alias
,
'test'
,
{
'alias'
:
'test'
}),
(
jpush
.
registration_id
,
'test'
,
{
'registration_id'
:
'test'
}),
)
for
selector
,
value
,
result
in
selectors
:
self
.
assertEqual
(
selector
(
value
),
result
)
tests/push/test_message.py
deleted
100644 → 0
View file @
7dcabe17
import
unittest
import
sys
sys
.
path
.
append
(
'../..'
)
import
jpush
as
jpush
class
TestMessage
(
unittest
.
TestCase
):
def
test_simple_alert
(
self
):
self
.
assertEqual
(
jpush
.
notification
(
alert
=
'Hello'
),
{
'alert'
:
'Hello'
})
def
test_ios
(
self
):
self
.
assertEqual
(
jpush
.
notification
(
ios
=
jpush
.
ios
(
alert
=
'Hello'
,
badge
=
'+1'
,
sound
=
'cat.caf'
,
extra
=
{
'more'
:
'stuff'
}
)),
{
'ios'
:
{
'alert'
:
'Hello'
,
'badge'
:
'+1'
,
'sound'
:
'cat.caf'
,
'extra'
:
{
'more'
:
'stuff'
,
}
}})
self
.
assertEqual
(
jpush
.
notification
(
ios
=
jpush
.
ios
(
content_available
=
True
)),
{
'ios'
:
{
'content-available'
:
True
}})
tests/push/test_push.py
deleted
100644 → 0
View file @
7dcabe17
import
unittest
import
requests
import
sys
sys
.
path
.
append
(
'../..'
)
import
jpush
as
jpush
class
TestPush
(
unittest
.
TestCase
):
def
test_full_payload
(
self
):
p
=
jpush
.
Push
(
None
)
p
.
audience
=
jpush
.
all_
p
.
notification
=
jpush
.
notification
(
alert
=
'Hello'
)
p
.
options
=
{}
p
.
paltform
=
jpush
.
all_
p
.
message
=
jpush
.
message
(
"Title"
,
"Body"
,
"text/html"
,
"utf8"
)
self
.
assertEqual
(
p
.
payload
,
{
"audience"
:
"all"
,
"notification"
:
{
"alert"
:
"Hello"
},
"platform"
:
"all"
,
"options"
:
{},
"message"
:
{
"msg_content"
:
"Hello message from jpush"
,
}
})
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