Exemple #1
0
    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)
Exemple #2
0
    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)
Exemple #3
0
    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
Exemple #4
0
    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
Exemple #7
0
    def test_penalty_with_empty_fields(self):
        conv = xmlconverter.PenaltyConverter()

        current = xmlconverter.convertstring(conv, self.penalty2)
        pprint(current)
Exemple #8
0
    def test_penalty(self):
        conv = xmlconverter.PenaltyConverter()

        current = xmlconverter.convertstring(conv, self.penalty1)
        pprint(current)
Exemple #9
0
 def test_violation(self):
     conv = xmlconverter.ViolationConverter()
     out = xmlconverter.convertstring(conv, self.violation)
Exemple #10
0
 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_provider(self):
		conv = xmlconverter.ProviderConverter()
		out = xmlconverter.convertstring(conv, self.provider)
Exemple #13
0
 def test_penalties(self):
     conv = xmlconverter.ListConverter(xmlconverter.PenaltyConverter())
     out = xmlconverter.convertstring(conv, self.penalties)
     pprint(out)
Exemple #14
0
    def test_penalty_with_empty_fields(self):
        conv = xmlconverter.PenaltyConverter()

        current = xmlconverter.convertstring(conv, self.penalty2)
        pprint(current)
Exemple #15
0
    def test_penalty(self):
        conv = xmlconverter.PenaltyConverter()

        current = xmlconverter.convertstring(conv, self.penalty1)
        pprint(current)
Exemple #16
0
 def test_penalties(self):
     conv = xmlconverter.ListConverter(xmlconverter.PenaltyConverter())
     out = xmlconverter.convertstring(conv, self.penalties)
     pprint(out)
Exemple #17
0
 def test_list(self):
     conv = xmlconverter.ListConverter(xmlconverter.ProviderConverter())
     out = xmlconverter.convertstring(conv, self.list)
     pprint(out)
	def test_violation(self):
		conv = xmlconverter.ViolationConverter()
		out = xmlconverter.convertstring(conv, self.violation)