File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ def testLocaltimeIntegration(self):
187187
188188class GeographyWikidataTestCase (SupyTestCase ):
189189 @skipIf (not network , "Network test" )
190- def testOsmidToTimezone (self ):
190+ def testRelationOsmidToTimezone (self ):
191191 self .assertEqual (
192192 wikidata .uri_from_osmid (450381 ),
193193 "http://www.wikidata.org/entity/Q22690" ,
@@ -196,6 +196,12 @@ def testOsmidToTimezone(self):
196196 wikidata .uri_from_osmid (192468 ),
197197 "http://www.wikidata.org/entity/Q47045" ,
198198 )
199+ @skipIf (not network , "Network test" )
200+ def testNodeOsmidToTimezone (self ):
201+ self .assertEqual (
202+ wikidata .uri_from_osmid (436012592 ),
203+ "http://www.wikidata.org/entity/Q933" ,
204+ )
199205
200206 @skipIf (not network , "Network test" )
201207 def testDirect (self ):
Original file line number Diff line number Diff line change 115115OSMID_QUERY = string .Template (
116116 """
117117SELECT ?item WHERE {
118- ?item wdt:P402 "$osmid".
118+ {
119+ ?item wdt:P402 "$osmid". # OSM relation ID
120+ }
121+ UNION
122+ {
123+ ?item wdt:P11693 "$osmid". # OSM node ID
124+ }
125+
119126}
120127LIMIT 1
121128"""
You can’t perform that action at this time.
0 commit comments