MCPcopy Create free account
hub / github.com/sissaschool/xmlschema / test_namespace

Method test_namespace

tests/test_dataobjects.py:104–114  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

102 return str(Path(__file__).parent.joinpath('test_cases', relative_path))
103
104 def test_namespace(self):
105 col_data = self.col_schema.decode(self.col_xml_filename)
106
107 self.assertIsInstance(col_data, DataElement)
108 self.assertEqual(col_data.tag, '{http://example.com/ns/collection}collection')
109 self.assertEqual(col_data.namespace, 'http://example.com/ns/collection')
110
111 self.assertEqual(col_data[0].tag, 'object')
112 self.assertEqual(col_data[0].namespace, 'http://example.com/ns/collection')
113
114 self.assertEqual(DataElement('foo').namespace, '')
115
116 def test_names(self):
117 col_data = self.col_schema.decode(self.col_xml_filename)

Callers

nothing calls this directly

Calls 2

DataElementClass · 0.90
decodeMethod · 0.45

Tested by

no test coverage detected