def test_make_full_metadata_default(self): a = SAMLAuthenticator() mock_handler_self = MagicMock() mock_handler_self.request.protocol = 'https' mock_handler_self.request.host = 'localhost:8000' assert a._make_sp_metadata( mock_handler_self) == self.full_sp_meta_default
def test_make_full_metadata_nameid_format(self): a = SAMLAuthenticator() a.nameid_format = 'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent' mock_handler_self = MagicMock() mock_handler_self.request.protocol = 'https' mock_handler_self.request.host = 'localhost:8000' assert a._make_sp_metadata( mock_handler_self) == self.full_sp_meta_nameid_format
def test_make_full_metadata_org_name(self): a = SAMLAuthenticator() a.organization_name = 'org_name' mock_handler_self = MagicMock() mock_handler_self.request.protocol = 'https' mock_handler_self.request.host = 'localhost:8000' assert a._make_sp_metadata( mock_handler_self) == self.full_sp_meta_org_name