Created new function find_tag to find XML like tags.
[philipp/winterrodeln/wrpylib.git] / tests / test_wrmwmarkup.py
index 393db5c299b01f92bc1180ea6492ca47ff175cd3..c38c823ee8a63e86f362532526171da190c82694 100644 (file)
@@ -1,6 +1,7 @@
 #!/usr/bin/python2.7
 # -*- coding: iso-8859-15 -*-
 import wrpylib.wrmwmarkup
+import wrpylib.mwmarkup
 import formencode
 import textwrap
 
@@ -58,7 +59,7 @@ def test_gasthausbox_to_inn():
     wrpylib.wrmwmarkup.inn_to_gasthausbox(inn)
 
 
-def test_parse_googlemap():
+def test_googlemap_to_wrmap():
     wikitext = u'''
     <googlemap version="0.9" lat="47.113291" lon="11.272337" zoom="15">
     (Parkplatz)47.114958,11.266026
@@ -73,7 +74,8 @@ def test_parse_googlemap():
     47.112408,11.271119
     </googlemap>
     '''
-    json = wrpylib.wrmwmarkup.parse_googlemap(wikitext)
+    center, zoom, coords, paths = wrpylib.mwmarkup.parse_googlemap(wikitext)
+    json = wrpylib.wrmwmarkup.googlemap_to_wrmap(center, zoom, coords, paths)
     assert json['properties']['lon'] == 11.272337
     assert json['properties']['lat'] == 47.113291
     assert json['properties']['zoom'] == 15