def test_XmlChanSpecifiedAttributes(self): sstream = ast.StringStream() chan = ast.XmlChan( sstream, 'XmlFormat="QUOTED", XmlLength=2000, XmlPrefix="foo"') self.assertEqual(chan.xmlFormat, "QUOTED") self.assertEqual(chan.xmlLength, 2000) self.assertEqual(chan.xmlPrefix, "foo") zoommap = ast.ZoomMap(4, 1.5) self.checkXmlPersistence(sstream=sstream, chan=chan, obj=zoommap)
def test_XmlChanDefaultAttributes(self): sstream = ast.StringStream() chan = ast.XmlChan(sstream) self.assertEqual(chan.xmlFormat, "NATIVE") self.assertEqual(chan.xmlLength, 0) self.assertEqual(chan.xmlPrefix, "") zoommap = ast.ZoomMap(3, 2.0) self.checkXmlPersistence(sstream=sstream, chan=chan, obj=zoommap)
def test_XmlChanSetAttributes(self): sstream = ast.StringStream() chan = ast.XmlChan(sstream) chan.xmlFormat = "QUOTED" chan.xmlLength = 1500 chan.xmlPrefix = "test" self.assertEqual(chan.xmlFormat, "QUOTED") self.assertEqual(chan.xmlLength, 1500) self.assertEqual(chan.xmlPrefix, "test") zoommap = ast.ZoomMap(1, 0.5) self.checkXmlPersistence(sstream=sstream, chan=chan, obj=zoommap)