def test_google_sets_query_result_width_to_none_if_missing_height_from_result(self):
     google = Google()
     item = {
         u'link': 'http://logo.com/logo.png',
         u'image': {
             u'width': 500,
         }
     }
     query_result = google.extract_query_result(item)
     assert query_result.height == None
Beispiel #2
0
 def test_google_sets_query_result_width_to_none_if_missing_height_from_result(
         self):
     google = Google()
     item = {
         u'link': 'http://logo.com/logo.png',
         u'image': {
             u'width': 500,
         }
     }
     query_result = google.extract_query_result(item)
     assert query_result.height == None
 def test_google_can_extract_a_query_result_object_with_width_from_a_result(self):
     google = Google()
     item = {
         u'link': 'http://logo.com/logo.png',
         u'image': {
             u'width': 250,
             u'height': 500
         }
     }
     query_result = google.extract_query_result(item)
     assert query_result.width == 250
Beispiel #4
0
 def test_google_can_extract_a_query_result_object_with_width_from_a_result(
         self):
     google = Google()
     item = {
         u'link': 'http://logo.com/logo.png',
         u'image': {
             u'width': 250,
             u'height': 500
         }
     }
     query_result = google.extract_query_result(item)
     assert query_result.width == 250
Beispiel #5
0
 def test_google_can_extract_a_query_result_object_with_url_from_a_result(
         self):
     google = Google()
     item = {u'link': 'http://logo.com/logo.png'}
     query_result = google.extract_query_result(item)
     assert query_result.url == 'http://logo.com/logo.png'
 def test_google_can_extract_a_query_result_object_with_url_from_a_result(self):
     google = Google()
     item = {u'link': 'http://logo.com/logo.png'}
     query_result = google.extract_query_result(item)
     assert query_result.url == 'http://logo.com/logo.png'