Changed create_wrmap to the new json definition. The test for parse_googlemap passes...
[philipp/winterrodeln/wrpylib.git] / tests / test_wrmwmarkup.py
index 189c7c152f8fcad01b85bcf07b1032e3810b4e17..77005dbc1fb712ca8be3ea78e541308702f30a25 100644 (file)
@@ -127,7 +127,6 @@ def test_parse_wrmap():
 
 
 def test_create_wrmap():
 
 
 def test_create_wrmap():
-    attributes = {'lon': 11.21408895, 'lat': 47.2417134, 'zoom': 14, 'width': 700, 'height': 400}
     geojson = {
         'type': 'FeatureCollection',
         'features':
     geojson = {
         'type': 'FeatureCollection',
         'features':
@@ -158,10 +157,16 @@ def test_create_wrmap():
                         [11.230868, 47.244951],
                         [11.237853, 47.245470]]},
                 'properties': {'type': 'sledrun'}
                         [11.230868, 47.244951],
                         [11.237853, 47.245470]]},
                 'properties': {'type': 'sledrun'}
-            }]
+            }],
+        'properties': {
+            'lon': 11.21408895,
+            'lat': 47.2417134,
+            'zoom': 14,
+            'width': 700,
+            'height': 400}
     }
 
     }
 
-    wikitext = wrpylib.wrmwmarkup.create_wrmap(attributes, geojson)
+    wikitext = wrpylib.wrmwmarkup.create_wrmap(geojson)
     assert wikitext == u'''
     <wrmap lat="47.2417134" lon="11.21408895" zoom="14" width="700" height="400">
     <gasthaus name="Rosskogelhütte" wiki="Rosskogelhütte">47.240689 11.190454</gasthaus>
     assert wikitext == u'''
     <wrmap lat="47.2417134" lon="11.21408895" zoom="14" width="700" height="400">
     <gasthaus name="Rosskogelhütte" wiki="Rosskogelhütte">47.240689 11.190454</gasthaus>