def test_toosm(self): xml_str_compare('<node id="0" lat="52.0" lon="0.0" visible="false"/>', etree.tostring(self.bare.toosm())) xml_str_compare( '<node id="0" lat="52.0" lon="0.0" timestamp="2008-01-25T00:00:00+00:00" user="******" visible="true"/>', etree.tostring(self.named.toosm())) xml_str_compare( '<node id="0" lat="52.0" lon="0.0" visible="false"><tag k="key" v="value"/></node>', etree.tostring(self.tagged.toosm()))
def test_toosm(self): xml_str_compare( '<way id="0" visible="false"><nd ref="0"/><nd ref="1"/><nd ref="2"/></way>', etree.tostring(self.bare.toosm()) ) xml_str_compare( '<way id="0" timestamp="2008-01-25T00:00:00+00:00" user="******" visible="true"><nd ref="0"/><nd ref="1"/><nd ref="2"/></way>', etree.tostring(self.named.toosm())) xml_str_compare( '<way id="0" visible="false"><tag k="key" v="value"/><nd ref="0"/><nd ref="1"/><nd ref="2"/></way>', etree.tostring(self.tagged.toosm()))
def test_toosm(self, node, result): xml_str_compare(result, etree.tostring(getattr(self, node).toosm()))