2014-08-28 02:21:28 +00:00
|
|
|
import unittest
|
2014-09-05 02:07:33 +00:00
|
|
|
from tests.api.apitestbase import ApiTestBase
|
2014-09-06 03:38:20 +00:00
|
|
|
from tests.api.urls import LIST_GROUP_AND_CONTACTS_URL
|
2014-09-05 02:07:33 +00:00
|
|
|
|
|
|
|
class MiscApiTest(ApiTestBase):
|
2014-09-06 03:38:20 +00:00
|
|
|
def test_list_group_and_contacts(self):
|
2014-09-05 02:07:33 +00:00
|
|
|
res = self.get(LIST_GROUP_AND_CONTACTS_URL).json()
|
|
|
|
self.assertIsNotNone(res)
|
|
|
|
self.assertIsInstance(res['contacts'], list)
|
|
|
|
self.assertIsNotNone(res['umsgnum'])
|
|
|
|
self.assertIsNotNone(res['replynum'])
|
|
|
|
self.assertIsInstance(res['groups'], list)
|
|
|
|
self.assertIsNotNone(res['gmsgnum'])
|
|
|
|
self.assertIsNotNone(res['newreplies'])
|