Skip to content

Commit

Permalink
fdsn: fix a test that fails due to an issue with IRIS event WADL, should
Browse files Browse the repository at this point in the history
be removed again, when IRIS updates the event WADL (and after updating
data/event.wadl)
  • Loading branch information
megies committed Oct 4, 2013
1 parent 87427c8 commit ef4b5a3
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions obspy/fdsn/tests/test_wadl_parser.py
Expand Up @@ -85,7 +85,17 @@ def test_event_wadl_parsing(self):
self.assertTrue("maxlongitude" in params)
self.assertTrue("minmagnitude" in params)
self.assertTrue("maxmagnitude" in params)
self.assertTrue("magnitudetype" in params)
# XXX hack for IRIS wadl that contains the abbreviated "magtype"
# XXX instead of the normal "magnitudetype" currently. Emailed them
# XXX about it, expecting that to be changed since no other
# XXX abbreviations are used in the WADL otherwise.
# XXX When it is changed at IRIS, we should update data/event.wadl
# XXX and remove this.
key_magnitudetype = "magnitudetype"
# XXX see above, remove following line again when event.wadl is fixed
# XXX at IRIS and data/event.wadl is updated
key_magnitudetype = "magtype"
self.assertTrue(key_magnitudetype in params)
self.assertTrue("catalog" in params)

self.assertTrue("contributor" in params)
Expand All @@ -112,11 +122,15 @@ def test_event_wadl_parsing(self):
# Same for the format attribute.
self.assertFalse("format" in params)

key_magnitudetype = "magnitudetype"
# XXX see above, remove following line again when event.wadl is fixed
# XXX at IRIS and data/event.wadl is updated
key_magnitudetype = "magtype"
self.assertEqual(
params["magnitudetype"]["doc_title"],
params[key_magnitudetype]["doc_title"],
"type of Magnitude used to test minimum and maximum limits "
"(case insensitive)")
self.assertEqual(params["magnitudetype"]["doc"],
self.assertEqual(params[key_magnitudetype]["doc"],
"Examples: Ml,Ms,mb,Mw\"")

def test_station_wadl_parsing(self):
Expand Down

0 comments on commit ef4b5a3

Please sign in to comment.