]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/blobdiff - tests/test_wrmwmarkup.py
Type of arrays are not tested.
[philipp/winterrodeln/wrpylib.git] / tests / test_wrmwmarkup.py
index d60129dc8742cf92cee04c263235d59a1ebdb945..f5248fd61c0cb07a26a059fa0c657bdf1fa85638 100644 (file)
@@ -6,7 +6,7 @@ import wrpylib.wrvalidators
 import wrpylib.wrmwmarkup
 from wrpylib.wrvalidators import LonLat
 from wrpylib.wrmwmarkup import sledrun_from_rodelbahnbox, sledrun_to_rodelbahnbox, \
-    inn_from_gasthausbox, inn_to_gasthausbox, lonlat_ele_from_template, latlon_ele_to_template
+    inn_from_gasthausbox, inn_to_gasthausbox, lonlat_ele_from_template, latlon_ele_to_template, create_sledrun_wiki
 
 
 class TestSledrun(unittest.TestCase):
@@ -441,7 +441,7 @@ class TestWrMap(unittest.TestCase):
 
         wikitext = wrpylib.wrmwmarkup.create_wrmap(geojson)
         self.assertEqual(wikitext, textwrap.dedent('''\
-        <wrmap height="400" lat="47.241713" lon="11.214089" width="700" zoom="14">
+        <wrmap lon="11.214089" lat="47.241713" zoom="14" width="700" height="400">
 
         <gasthaus name="Rosskogelhütte" wiki="Rosskogelhütte">47.240689 N 11.190454 E</gasthaus>
         <parkplatz>47.245789 N 11.238971 E</parkplatz>
@@ -454,3 +454,9 @@ class TestWrMap(unittest.TestCase):
         </rodelbahn>
 
         </wrmap>'''))
+
+
+class TestWikiJson(unittest.TestCase):
+    def test_empty_json(self):
+        wiki_text = create_sledrun_wiki({}, None)
+        self.assertIsInstance(wiki_text, str)