Exemplo n.º 1
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
Exemplo n.º 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
Exemplo n.º 3
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
Exemplo n.º 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
Exemplo n.º 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'
Exemplo n.º 6
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'