def test_can_queue_poll(self): client = ImClient(KEY, SECRET) res = client.chatroom.queue_poll(**{ 'roomid': 24938834, }).json() print res self.assertEqual(res['code'], 200)
def test_can_get_info(self): client = ImClient(KEY, SECRET) res = client.user.get_info(**{ 'accids': ['jingyuxiaoban_accid'], }).json() print res self.assertEqual(res['code'], 200)
def test_can_unblock(self): client = ImClient(KEY, SECRET) res = client.user.unblock(**{ 'accid': 'jingyuxiaoban_accid', }).json() print res self.assertEqual(res['code'], 200)
def test_can_delete_media_file(self): client = ImClient(KEY, SECRET) res = client.history.delete_media_file(**{ 'channelid': 144359963111, }).json() print res self.assertEqual(res['code'], 200)
def test_can_list_black_and_mute(self): client = ImClient(KEY, SECRET) res = client.user.list_black_and_mute(**{ 'accid': 'jingyuxiaoban_accid', }).json() print res self.assertEqual(res['code'], 200)
def test_can_query_broadcast_msg_by_id(self): client = ImClient(KEY, SECRET) res = client.history.query_broadcast_msg_by_id(**{ 'broadcastId': 123, }).json() print res self.assertEqual(res['code'], 200)
def test_can_update(self): client = ImClient(KEY, SECRET) res = client.chatroom.update(**{ 'roomid': 24938834, 'name': u'你的', }).json() print res self.assertEqual(res['code'], 200)
def test_can_set_donnop(self): client = ImClient(KEY, SECRET) res = client.user.set_donnop(**{ 'accid': 'jingyuxiaoban_accid', 'donnopOpen': True }).json() print res self.assertEqual(res['code'], 200)
def test_can_get(self): client = ImClient(KEY, SECRET) res = client.friend.get(**{ 'accid': 'jingyuxiaoban_accid', 'updatetime': 1443599631111 }).json() print res self.assertEqual(res['code'], 200)
def test_can_delete(self): client = ImClient(KEY, SECRET) res = client.friend.delete(**{ 'accid': 'jingyuxiaoban_accid', 'faccid': 'jingyuxiaoban_accid1', }).json() print res self.assertEqual(res['code'], 200)
def test_can_get_batch(self): client = ImClient(KEY, SECRET) res = client.chatroom.get_batch(**{ 'roomids': [24938834], 'needOnlineUserCount': True, }).json() print res self.assertEqual(res['code'], 200)
def test_can_queue_init(self): client = ImClient(KEY, SECRET) res = client.chatroom.queue_init(**{ 'roomid': 24938834, 'sizeLimit': 500, }).json() print res self.assertEqual(res['code'], 200)
def test_can_query_members(self): client = ImClient(KEY, SECRET) res = client.chatroom.query_members(**{ 'roomid': 24938834, 'accids': ['jingyuxiaoban_accid'], }).json() print res self.assertEqual(res['code'], 200)
def test_can_delete_history_msg(self): client = ImClient(KEY, SECRET) res = client.chatroom.delete_history_msg(**{ 'roomid': 24938834, 'fromAcc': 'jingyuxiaoban_accid', 'msgTimetag': 144359963111, }).json() print res self.assertEqual(res['code'], 200)
def test_can_create(self): client = ImClient(KEY, SECRET) res = client.chatroom.create(**{ 'creator': 'jingyuxiaoban_accid', 'name': u'测试聊天室', 'queuelevel': CHATROOM_QUEUE_LEVEL_PERM_ADMIN, }).json() print res self.assertEqual(res['code'], 200)
def test_can_broadcast_msg(self): client = ImClient(KEY, SECRET) res = client.message.broadcast_msg( **{ 'body': 'abcd', 'targetOs': ["ios", "aos", "pc", "web", "mac"], }).json() print res self.assertEqual(res['code'], 200)
def test_can_upload_file(self): client = ImClient(KEY, SECRET) res = client.message.upload_file( **{ 'content': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA/CAYAAAC1gwumAAAAAXNSR0IArs4c6QAAGl5JREFUaAXdm2lzHNd1hs/sOwYYLMRKgJu4LxJFWZIV2XHKWSrlSqXij04+5VelKj8h5ZSdqlRSZVuOtYukKFHcCS5YiXWAwWD2mc7z3kEDM0NBW77lshrd03373nv295zbDNQ9zzNauFXXab81gpH966+7CDTda/uPvFBg/1oXoe7H1my2up5bONj1u72Kg1uBZsMCgYMxvVDo4CFX4Wat67eFouaP4b+m3+HK9seuY6PRsHA4zEKa7nck0k1gq9W9wFa72/4kLa97wkCgm8I9Pu73Ny96cM1VINjNYM/rJsise37Pay9A4+oIBrvHM6/NQGgKu4mi0aiJCHFN170L6iXQCx5w1w0Q6F5QL4Gd0lD/VrNbgtbzvlnPczfJwZ/Qnsb4BHpez3p6CRQB8XjcSVDXweA3TxAIdhO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N+wgGHZfarz7djqNlttOBHV/uocMYrCqrHGce9RiH3Bltv60irec93Nk+Z7tf5M0t760QXkq8+8vn/7zgRSB5OjxsPJ9szixMVCcccezS/ZykaemhklPOBcLAWsY3sr198uDCvdUXE3TCwcVY01wVY4MBKNpkpdtMJm3p2b9Emysfn6pVftq8/v2NzinE0fPWYl7P/SlZOWoD70Q9p3JzAEgdhP0NVGKECBbuOUG7RvB+22WWCxgPJl9jHybMjMzq1QQozayJEhADESIgDHcfdVdoTWqdvUeL+fYvEIe/g6D/JJWCaTdQzUxk8hv2VHqBjcvPWZ/fnP32TuH0Kei4MfuUCvws83tm957uPLgzHCDsbp00clzhG23FREltrqy+LOsoLe8fg8Bd3Yu98O1D56USwWDO1qvetRgHf3RIcOZemgrpe+dXa3X/7TS8C3O6YWles0XwRS2pBr1ITodpOwIe/80oJ7phTK8ecQgcoyfkgDruyxxkGcHzLEIe/gbRrETam1Q/VsPTtJsFhhxkbvfws4ZJj/6+19CSqkfVP7/hJUvkaG3944cNhQY0h630WC6uvP6c7fsr7D1o4E29Yb6NHpAHCrs7303wh60W7PAsL6pNhZd3sUEhn8LNq610/pXGcjyrZ/uvt0ouZyoMZsyPiatv9S9/ra/1FFatxWZX+9QEoMntaCY53NeceOG5E9dO7f4qvlrkYRrKsJUHe2YPhgm1n3VUXraj0MCimx7mitSPd4vgPyu1DB9i/d2acn3Ay1A6ivDvu9VOLubD0EKi/sbD3j4w+731ei3NnC2GJnIxnpbj0Sq4GNO1uQjc7u1j0A+Y57zIdA690z+2/1qKDQS2dzqVnHjd5si92MjqfSkG4/774y6ejRS6BH3O1sQb6r+cbWw0DfFoCBvU/aw/Te9l32YZN8W//v+7x3nm+bv7e//7tbLP7d/0fn/wW4NWqKu0JgqgAAAABJRU5ErkJggg==', }).json() print res self.assertEqual(res['code'], 200)
def test_can_request_addr(self): client = ImClient(KEY, SECRET) res = client.chatroom.request_addr(**{ 'roomid': 24938834, 'accid': 'jingyuxiaoban_accid', 'clienttype': CHATROOM_CLIENT_TYPE_MP, }).json() print res self.assertEqual(res['code'], 200)
def test_can_toggle_close_stat(self): client = ImClient(KEY, SECRET) res = client.chatroom.toggle_close_stat(**{ 'roomid': 24938834, 'operator': 'jingyuxiaoban_accid', 'valid': True }).json() print res self.assertEqual(res['code'], 200)
def test_can_mute_room(self): client = ImClient(KEY, SECRET) res = client.chatroom.mute_room(**{ 'roomid': 24938834, 'operator': 'jingyuxiaoban_accid', 'mute': True }).json() print res self.assertEqual(res['code'], 200)
def test_can_queue_offer(self): client = ImClient(KEY, SECRET) res = client.chatroom.queue_offer(**{ 'roomid': 24938834, 'key': 'key', 'value': 'value' }).json() print res self.assertEqual(res['code'], 200)
def test_can_subscribe_batch_delete(self): client = ImClient(KEY, SECRET) res = client.event.subscribe_batch_delete( **{ 'accid': 'jingyuxiaoban_accid', 'eventType': EVENT_TYPE_SUBSCRIBE, }).json() print res self.assertEqual(res['code'], 200)
def test_can_update(self): client = ImClient(KEY, SECRET) res = client.user.update(**{ 'accid': 'jingyuxiaoban_accid', 'token': '', 'props': '', }).json() print res self.assertEqual(res['code'], 200)
def test_can_subscribe_query(self): client = ImClient(KEY, SECRET) res = client.event.subscribe_query( **{ 'accid': 'jingyuxiaoban_accid', 'publisherAccids': ['jingyuxiaoban_accid1'], 'eventType': EVENT_TYPE_SUBSCRIBE, }).json() print res self.assertEqual(res['code'], 200)
def test_can_temporary_mute(self): client = ImClient(KEY, SECRET) res = client.chatroom.temporary_mute(**{ 'roomid': 24938834, 'operator': 'jingyuxiaoban_accid', 'target': 'jingyuxiaoban_accid', 'muteDuration': 300 }).json() print res self.assertEqual(res['code'], 200)
def test_can_members_by_page(self): client = ImClient(KEY, SECRET) res = client.chatroom.members_by_page(**{ 'roomid': 24938834, 'type': CHATROOM_MEMBER_TYPE_FIX, 'endtime': 0, 'limit': 30 }).json() print res self.assertEqual(res['code'], 200)
def test_can_set_special_relation(self): client = ImClient(KEY, SECRET) res = client.user.set_special_relation(**{ 'accid': 'jingyuxiaoban_accid', 'targetAcc': 'jingyuxiaoban_accid1', 'relationType': RELATION_TYPE_BLACK, 'value': OP_VALUE_ADD }).json() print res self.assertEqual(res['code'], 200)
def test_can_update_my_room_role(self): client = ImClient(KEY, SECRET) res = client.chatroom.update_my_room_role(**{ 'roomid': 24938834, 'accid': 'jingyuxiaoban_accid', 'save': True, 'name': 'manson', }).json() print res self.assertEqual(res['code'], 200)
def test_can_send_msg(self): client = ImClient(KEY, SECRET) res = client.chatroom.send_msg(**{ 'roomid': 24938834, 'msgId': 'abcdouifewlkjf', 'fromAccid': 'jingyuxiaoban_accid', 'attach': 'abcdmanfkj', 'msgType': MESSAGE_TYPE_TEXT }).json() print res self.assertEqual(res['code'], 200)
def test_can_set_member_role(self): client = ImClient(KEY, SECRET) res = client.chatroom.set_member_role(**{ 'roomid': 24938834, 'operator': 'jingyuxiaoban_accid', 'target': 'jingyuxiaoban_accid', 'opt': CHATROOM_OPT_ADMIN, 'optvalue': True }).json() print res self.assertEqual(res['code'], 200)