Added a test to GasthausboxDictConverter.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Mon, 17 Mar 2014 20:15:45 +0000 (20:15 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Mon, 17 Mar 2014 20:15:45 +0000 (20:15 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wrpylib/trunk@1933 7aebc617-e5e2-0310-91dc-80fb5f6d2477

tests/test_wrmwmarkup.py

index b4509380336b7ff94a19f5c396f311b558391dc6..9d83aa1296253e7595cae8951eb356285b3db8a2 100644 (file)
@@ -154,6 +154,28 @@ def test_gasthausbox_to_inn():
     wrpylib.wrmwmarkup.inn_to_gasthausbox(inn)
 
 
     wrpylib.wrmwmarkup.inn_to_gasthausbox(inn)
 
 
+def test_GasthausboxDictConverter():
+    v = wrpylib.wrmwmarkup.GasthausboxDictConverter()
+    other = collections.OrderedDict([
+    (u'Position', (47.295549, 9.986970)),
+    (u'Höhe', 1250),
+    (u'Betreiber', None),
+    (u'Sitzplätze', None),
+    (u'Übernachtung', (None, None)),
+    (u'Rauchfrei', (True, False)),
+    (u'Rodelverleih', (None, None)),
+    (u'Handyempfang', u'A1; T-Mobile/Telering'),
+    (u'Homepage', u'http://www.bergkristallhuette.com/'),
+    (u'E-Mail', u'bergkristallhuette@gmx.at'),
+    (u'Telefon', u'+43-664-1808482'),
+    (u'Bild', u'Bergkritsallhütte 2009-02-07.JPG'),
+    (u'Rodelbahnen', u'[[Bergkristallhütte]]')])
+    inn = v.to_python(other)
+    assert inn.homepage == u'http://www.bergkristallhuette.com/'
+    other2 = v.from_python(inn)
+    assert other == other2
+
+
 def test_googlemap_to_wrmap():
     wikitext = u'''
     <googlemap version="0.9" lat="47.113291" lon="11.272337" zoom="15" height="450">
 def test_googlemap_to_wrmap():
     wikitext = u'''
     <googlemap version="0.9" lat="47.113291" lon="11.272337" zoom="15" height="450">