def testGetChannelById(self): db = getDbObject(DB) obj_id = db[COLLECTION].save({NAME: 'test_GT_1286'}) with self.assertRaises(ChannelDoesNotExist): getChannelById('testservice', '111111111111111111111111') obj = getChannelById('testservice', obj_id) self.assertEqual(obj['name'], 'test_GT_1286')
def get(self, serviceName, channelId): obj = getChannelById(serviceName, channelId) return obj, 200
def test_Dumps_Plugin_Geocoder_Channels(self): res = getChannelById(TEST_DB, channel_id) self.assertEqual(res[NAME], channel_name)