Exemple #1
0
    def testUsingTestData(self):
        """Test SubjectLocalityFromString() using test data"""

        subject_locality = saml.subject_locality_from_string(saml2_data.TEST_SUBJECT_LOCALITY)
        assert subject_locality.address == "127.0.0.1"
        assert subject_locality.dns_name == "localhost"

        new_subject_locality = saml.subject_locality_from_string(subject_locality.to_string())
        assert new_subject_locality.address == "127.0.0.1"
        assert new_subject_locality.dns_name == "localhost"
        assert subject_locality.to_string() == new_subject_locality.to_string()
Exemple #2
0
 def testAccessors(self):
     """Test for SubjectLocality accessors"""
     self.subject_locality.address = "127.0.0.1"
     self.subject_locality.dns_name = "localhost"
     assert self.subject_locality.address == "127.0.0.1"
     assert self.subject_locality.dns_name == "localhost"
     new_subject_locality = saml.subject_locality_from_string(self.subject_locality.to_string())
     assert new_subject_locality.address == "127.0.0.1"
     assert new_subject_locality.dns_name == "localhost"