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):
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>
</rodelbahn>
</wrmap>'''))
+
+
+class TestWikiJson(unittest.TestCase):
+ def test_empty_json(self):
+ wiki_text = create_sledrun_wiki({}, None)
+ self.assertIsInstance(wiki_text, str)