Added further tests for test_inn_to_gasthausbox_none.
[philipp/winterrodeln/wrpylib.git] / tests / test_wrmwmarkup.py
index 98f9067fc94ed0ee1fa199f9891ca83c82a8a846..70cc665302958c473fbe916fdfeaaed5405dac78 100644 (file)
@@ -244,6 +244,41 @@ class TestInn(unittest.TestCase):
         self.assertEqual(inn.image, None)
         self.assertEqual(inn.sledding_list, None)
 
         self.assertEqual(inn.image, None)
         self.assertEqual(inn.sledding_list, None)
 
+    def test_inn_to_gasthausbox_none(self):
+        class Inn:
+            pass
+        inn = Inn()
+        inn.position_latitude = None
+        inn.position_longitude = None
+        inn.position_elevation = None
+        inn.operator = None
+        inn.seats = None
+        inn.overnight = None
+        inn.overnight_comment = None
+        inn.smoker_area = None
+        inn.nonsmoker_area = None
+        inn.sled_rental = None
+        inn.sled_rental_comment = None
+        inn.mobile_provider = None
+        inn.homepage = None
+        inn.email_list = None
+        inn.phone_list = None
+        inn.image = None
+        inn.sledding_list = None
+        gasthausbox = inn_to_gasthausbox(inn)
+        self.assertEqual(gasthausbox['Position'], LonLat(None, None))
+        self.assertEqual(gasthausbox['Höhe'], None)
+        self.assertEqual(gasthausbox['Betreiber'], None)
+        self.assertEqual(gasthausbox['Sitzplätze'], None)
+        self.assertEqual(gasthausbox['Übernachtung'], (None, None))
+        self.assertEqual(gasthausbox['Rauchfrei'], None)
+        self.assertEqual(gasthausbox['Rodelverleih'], (None, None))
+        self.assertEqual(gasthausbox['Handyempfang'], None)
+        self.assertEqual(gasthausbox['Homepage'], (None, None))
+        self.assertEqual(gasthausbox['E-Mail'], None)
+        self.assertEqual(gasthausbox['Telefon'], None)
+        self.assertEqual(gasthausbox['Bild'], None)
+        self.assertEqual(gasthausbox['Rodelbahnen'], None)
 
 
 class TestLonlatEle(unittest.TestCase):
 
 
 class TestLonlatEle(unittest.TestCase):