Replaced assert statements with assertEqual in test_wrmwmarkup.py.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 29 Jan 2017 22:19:11 +0000 (22:19 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 29 Jan 2017 22:19:11 +0000 (22:19 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wrpylib/trunk@2635 7aebc617-e5e2-0310-91dc-80fb5f6d2477

tests/test_wrmwmarkup.py

index 9d1a74874395f5d5d88c3d935842c34403d65495..2be3f6e796db5aa6c18dd3b2fa4fe1086d9cdc9c 100644 (file)
@@ -380,25 +380,25 @@ class TestWrMap(unittest.TestCase):
         </wrmap>
         '''
         json = wrpylib.wrmwmarkup.parse_wrmap(wikitext)
-        assert json['properties']['lon'] == 11.21408895
-        assert json['properties']['lat'] == 47.2417134
-        assert json['properties']['zoom'] == 14
-        assert json['properties']['width'] == 700
-        assert json['properties']['height'] == 400
-        assert json['features'][0]['properties']['type'] == 'gasthaus'
-        assert json['features'][0]['properties']['name'] == 'Rosskogelhütte'
-        assert json['features'][0]['properties']['wiki'] == 'Rosskogelhütte'
-        assert json['features'][0]['geometry']['coordinates'] == [11.190454, 47.240689]
-        assert json['features'][1]['properties']['type'] == 'parkplatz'
-        assert json['features'][1]['geometry']['coordinates'] == [11.238971, 47.245789]
-        assert json['features'][2]['properties']['type'] == 'haltestelle'
-        assert json['features'][2]['properties']['name'] == 'Oberperfuss Rangger Köpfl Lift'
-        assert json['features'][2]['geometry']['coordinates'] == [11.238283, 47.245711]
-        assert json['features'][3]['properties']['type'] == 'rodelbahn'
-        assert json['features'][3]['geometry']['coordinates'] == [
+        self.assertEqual(json['properties']['lon'], 11.21408895)
+        self.assertEqual(json['properties']['lat'], 47.2417134)
+        self.assertEqual(json['properties']['zoom'], 14)
+        self.assertEqual(json['properties']['width'], 700)
+        self.assertEqual(json['properties']['height'], 400)
+        self.assertEqual(json['features'][0]['properties']['type'], 'gasthaus')
+        self.assertEqual(json['features'][0]['properties']['name'], 'Rosskogelhütte')
+        self.assertEqual(json['features'][0]['properties']['wiki'], 'Rosskogelhütte')
+        self.assertEqual(json['features'][0]['geometry']['coordinates'], [11.190454, 47.240689])
+        self.assertEqual(json['features'][1]['properties']['type'], 'parkplatz')
+        self.assertEqual(json['features'][1]['geometry']['coordinates'], [11.238971, 47.245789])
+        self.assertEqual(json['features'][2]['properties']['type'], 'haltestelle')
+        self.assertEqual(json['features'][2]['properties']['name'], 'Oberperfuss Rangger Köpfl Lift')
+        self.assertEqual(json['features'][2]['geometry']['coordinates'], [11.238283, 47.245711])
+        self.assertEqual(json['features'][3]['properties']['type'], 'rodelbahn')
+        self.assertEqual(json['features'][3]['geometry']['coordinates'], [
             [11.203360, 47.238587],
             [11.230868, 47.244951],
-            [11.237853, 47.245470]]
+            [11.237853, 47.245470]])
 
     def test_create_wrmap(self):
         geojson = {
@@ -441,7 +441,7 @@ class TestWrMap(unittest.TestCase):
         }
 
         wikitext = wrpylib.wrmwmarkup.create_wrmap(geojson)
-        assert wikitext == textwrap.dedent('''\
+        self.assertEqual(wikitext, textwrap.dedent('''\
         <wrmap height="400" lat="47.241713" lon="11.214089" width="700" zoom="14">
 
         <gasthaus name="Rosskogelhütte" wiki="Rosskogelhütte">47.240689 N 11.190454 E</gasthaus>
@@ -454,4 +454,4 @@ class TestWrMap(unittest.TestCase):
         47.245470 N 11.237853 E
         </rodelbahn>
 
-        </wrmap>''')
+        </wrmap>'''))