Ejemplo n.º 1
0
    def testUsingTestData(self):
        """Test audience_restriction_from_string using test data"""

        audience_restriction = saml.audience_restriction_from_string(saml2_data.TEST_AUDIENCE_RESTRICTION)
        assert audience_restriction.audience[0].text.strip() == "http://www.example.com/Audience"
Ejemplo n.º 2
0
    def testAccessors(self):
        """Test for AudienceRestriction accessors"""

        self.audience_restriction.audience = saml.audience_from_string(saml2_data.TEST_AUDIENCE)
        new_audience = saml.audience_restriction_from_string(self.audience_restriction.to_string())
        assert self.audience_restriction.audience.text.strip() == "http://www.example.com/Audience"