def test_enforcementjob(self): conv = xmlconverter.EnforcementConverter() current = xmlconverter.convertstring(conv, self.ejob1) expected = wsag_model.EnforcementJob("$id", True) self.assertEquals(current, expected) current = xmlconverter.convertstring(conv, self.ejob2) expected = wsag_model.EnforcementJob("$id", False) self.assertEquals(current, expected)
def test_template(self): slatemplate = slaclient.templates.fed4fire.render_slatemplate( self.templateinput) # convert xml to wsag_model classes actual = xmlconverter.convertstring(self.converter, slatemplate) """:type: wsag_model.Template""" expected = self.templateinput self.assertEquals(expected.template_id, actual.template_id) self._check_common(expected, actual) print slatemplate
def test_agreement(self): slaagreement = slaclient.templates.fed4fire.render_slaagreement( self.agreementinput) # convert xml to wsag_model classes actual = xmlconverter.convertstring(self.converter, slaagreement) """:type: wsag_model.Agreement""" expected = self.agreementinput self.assertEquals(expected.agreement_id, actual.agreement_id) expected.consumer and self.assertEquals(expected.consumer, actual.context.consumer) self._check_common(expected, actual) self._check_guarantee_terms(expected, actual) print slaagreement
def test_template(self): slatemplate = slaclient.templates.xifi.render_slatemplate( self.templateinput ) # convert xml to wsag_model classes actual = xmlconverter.convertstring(self.converter, slatemplate) """:type: wsag_model.Template""" expected = self.templateinput self.assertEquals( expected.template_id, actual.template_id ) self._check_common(expected, actual) print slatemplate
def test_agreement(self): slaagreement = slaclient.templates.xifi.render_slaagreement( self.agreementinput ) # convert xml to wsag_model classes actual = xmlconverter.convertstring(self.converter, slaagreement) """:type: wsag_model.Agreement""" expected = self.agreementinput self.assertEquals( expected.agreement_id, actual.agreement_id ) expected.consumer and self.assertEquals( expected.consumer, actual.context.consumer ) self._check_common(expected, actual) self._check_guarantee_terms(expected, actual) print slaagreement
def test_penalty_with_empty_fields(self): conv = xmlconverter.PenaltyConverter() current = xmlconverter.convertstring(conv, self.penalty2) pprint(current)
def test_penalty(self): conv = xmlconverter.PenaltyConverter() current = xmlconverter.convertstring(conv, self.penalty1) pprint(current)
def test_violation(self): conv = xmlconverter.ViolationConverter() out = xmlconverter.convertstring(conv, self.violation)
def test_provider(self): conv = xmlconverter.ProviderConverter() out = xmlconverter.convertstring(conv, self.provider)
def test_list(self): conv = xmlconverter.ListConverter(xmlconverter.ProviderConverter()) out = xmlconverter.convertstring(conv, self.list)
def test_penalties(self): conv = xmlconverter.ListConverter(xmlconverter.PenaltyConverter()) out = xmlconverter.convertstring(conv, self.penalties) pprint(out)
def test_list(self): conv = xmlconverter.ListConverter(xmlconverter.ProviderConverter()) out = xmlconverter.convertstring(conv, self.list) pprint(out)