Commit 759ecbd5 authored by hupantingxue's avatar hupantingxue

1. Add test case;

2. Update travis run script;
parent af8a7117
...@@ -9,4 +9,4 @@ python: ...@@ -9,4 +9,4 @@ python:
install: "pip install requests" install: "pip install requests"
# command to run tests # command to run tests
script: nosetests script: nosetests -w tests/push/
...@@ -7,8 +7,8 @@ class TestAudience(unittest.TestCase): ...@@ -7,8 +7,8 @@ class TestAudience(unittest.TestCase):
selectors = ( selectors = (
(jpush.tag, 'tag1', {'tag': ['tag1']}), (jpush.tag, 'tag1', {'tag': ['tag1']}),
(jpush.tag_and, 'tag1', {'tag_and': ['tag1']}), (jpush.tag_and, 'tag1', {'tag_and': ['tag1']}),
(jpush.alias, 'alias1', {'alias':'alias1'}), (jpush.alias, 'alias1', {'alias':['alias1']}),
(jpush.registration_id, 'regid1', {'registration_id':'regid1'}), (jpush.registration_id, 'regid1', {'registration_id':['regid1']}),
) )
for selector, value, result in selectors: for selector, value, result in selectors:
self.assertEqual(selector(value), result) self.assertEqual(selector(value), result)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment