コード例 #1
0
    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'])
コード例 #2
0
ファイル: test_dailymotion.py プロジェクト: 3615pipou/searx
    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'])
コード例 #3
0
ファイル: test_dailymotion.py プロジェクト: cy8aer/searx
 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'])