1. Mikhail Korobov
  2. yandex-maps

Commits

Mikhail Korobov  committed c878012

Возвращаем всегда tuple

  • Participants
  • Parent commits ea1cab4
  • Branches default

Comments (0)

Files changed (2)

File yandex_maps/api.py

View file
  • Ignore whitespace
         dom = xml.dom.minidom.parseString(response)
         pos_elem = dom.getElementsByTagName('pos')[0]
         pos_data = pos_elem.childNodes[0].data
-        return pos_data.split()
+        return tuple(pos_data.split())
     except IndexError:
         return None, None

File yandex_maps/tests.py

View file
  • Ignore whitespace
 '''.encode('utf8')
 
 TEST_API_KEY = 'vasia'
-COORDS = [u'60.603826', u'56.854581']
+COORDS = (u'60.603826', u'56.854581')
 MAP_URL = 'http://static-maps.yandex.ru/1.x/?ll=60.6038260,56.8545810&size=200,300&z=5&l=map&pt=60.6038260,56.8545810&key=vasia'
 
 class GeocodeParsingTest(TestCase):