Commit 72415cd4 authored by hupantingxue's avatar hupantingxue

1. Add unit test cases;

2. Add device test core file;
parent b012beea
#!/usr/bin/env python
class Device(object):
"""Device info query/update..
"""
def __init__(self):
self.entity = None
class DeviceResponse(object):
"""
"""
import unittest
import jpush as jpush
class TestAudience(unittest.TestCase):
def test_basic_selectors(self):
selectors = (
(jpush.tag, 'tag1', {'tag': ['tag1']}),
(jpush.tag_and, 'tag1', {'tag_and': ['tag1']}),
(jpush.alias, 'alias1', {'alias':'alias1'}),
(jpush.registration_id, 'regid1', {'registration_id':'regid1'}),
)
for selector, value, result in selectors:
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