def test_request(self): query = 'test_query' dicto = defaultdict(dict) dicto['pageno'] = 0 dicto['language'] = 'fr_FR' params = dailymotion.request(query, dicto) self.assertTrue('url' in params) self.assertTrue(query in params['url']) self.assertTrue('dailymotion.com' in params['url']) self.assertTrue('fr' in params['url']) dicto['language'] = 'all' params = dailymotion.request(query, dicto) self.assertTrue('en' in params['url'])
def test_request(self): dailymotion.supported_languages = ['en', 'fr'] query = 'test_query' dicto = defaultdict(dict) dicto['pageno'] = 0 dicto['language'] = 'fr-FR' params = dailymotion.request(query, dicto) self.assertTrue('url' in params) self.assertTrue(query in params['url']) self.assertTrue('dailymotion.com' in params['url']) self.assertTrue('fr' in params['url'])