def testManualInfluencesToXml(self):
     '''
     test serialize to XML and back
     '''
     exporter = XmlExporter()
     model1 = self.createSampleModel()
     model1.addMirrorInfluenceAssociationOverride("a", "b", selfReference=False, bidirectional=True)
     xml = exporter.process(model1)
     print xml
     self.assertNotEquals(xml.find(r'<mirrorInfluenceAssociation destination="b" source="a"/>'),-1);
 def testManualInfluencesToXml(self):
     '''
     test serialize to XML and back
     '''
     exporter = XmlExporter()
     model1 = self.createSampleModel()
     model1.addMirrorInfluenceAssociationOverride("a", "b", selfReference=False, bidirectional=True)
     xml = exporter.process(model1)
     print xml
     self.assertNotEquals(xml.find(r'<mirrorInfluenceAssociation destination="b" source="a"/>'),-1);
 def testXml(self):
     '''
     test serialize to XML and back
     '''
     model1 = self.createSampleModel()
     exporter = XmlExporter()
     xml = exporter.process(model1)
     
     importer = XmlImporter()
     model2 = importer.process(xml)
     
     # make sure unserialized model matches original model
     self.assertModelsEqual(model1, model2)
示例#4
0
    def testXml(self):
        '''
        test serialize to XML and back
        '''
        model1 = self.createSampleModel()
        exporter = XmlExporter()
        xml = exporter.process(model1)

        importer = XmlImporter()
        model2 = importer.process(xml)

        # make sure unserialized model matches original model
        self.assertModelsEqual(model1, model2)