Beispiel #1
0
 def test_request(self):
     query = 'test_query'
     dicto = defaultdict(dict)
     dicto['pageno'] = 0
     params = deviantart.request(query, dicto)
     self.assertTrue('url' in params)
     self.assertTrue(query in params['url'])
     self.assertTrue('deviantart.com' in params['url'])
Beispiel #2
0
 def test_request(self):
     query = 'test_query'
     dicto = defaultdict(dict)
     dicto['pageno'] = 0
     params = deviantart.request(query, dicto)
     self.assertTrue('url' in params)
     self.assertTrue(query in params['url'])
     self.assertTrue('deviantart.com' in params['url'])
Beispiel #3
0
 def test_request(self):
     dicto = defaultdict(dict)
     query = "test_query"
     dicto["pageno"] = 0
     dicto["time_range"] = ""
     params = deviantart.request(query, dicto)
     self.assertTrue("url" in params)
     self.assertTrue(query in params["url"])
     self.assertTrue("deviantart.com" in params["url"])
Beispiel #4
0
 def test_no_url_in_request_year_time_range(self):
     dicto = defaultdict(dict)
     query = "test_query"
     dicto["time_range"] = "year"
     params = deviantart.request(query, dicto)
     self.assertEqual({}, params["url"])
Beispiel #5
0
 def test_no_url_in_request_year_time_range(self):
     dicto = defaultdict(dict)
     query = 'test_query'
     dicto['time_range'] = 'year'
     params = deviantart.request(query, dicto)
     self.assertEqual({}, params['url'])