From: philipp Date: Mon, 17 Mar 2014 20:15:45 +0000 (+0000) Subject: Added a test to GasthausboxDictConverter. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/2a54736a2348ed967960385ad68ca0b7768d067f?ds=sidebyside Added a test to GasthausboxDictConverter. git-svn-id: http://www.winterrodeln.org/svn/wrpylib/trunk@1933 7aebc617-e5e2-0310-91dc-80fb5f6d2477 --- diff --git a/tests/test_wrmwmarkup.py b/tests/test_wrmwmarkup.py index b450938..9d83aa1 100644 --- a/tests/test_wrmwmarkup.py +++ b/tests/test_wrmwmarkup.py @@ -154,6 +154,28 @@ def test_gasthausbox_to_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'''