def testGetChannelsList(self): result = getChannelsList(TEST_SERVICE, 'test_channel_', 3, 1) self.assertEquals(list(result), TEST_LIST) result = getChannelsList(TEST_SERVICE, 'test_channel_GT_1264', 3, 1) self.assertEquals(list(result), []) result = getChannelsList(TEST_SERVICE, 'test_channel_2', None, None) self.assertEquals(list(result), TEST_LIST2)
def get(self, serviceName): parserResult = ChannelsListResourceParser.parseGetParameters() return getChannelsList( serviceName, parserResult.get( SUBSTRING, None), parserResult.get( NUMBER, None), parserResult.get( OFFSET, None))