def setUp(self): super(AppTests, self).setUp() self.test_user_eppn = 'hubba-bubba' self.test_user_nin = '200001023456' self.mock_address = OrderedDict([ (u'Name', OrderedDict([(u'GivenNameMarking', u'20'), (u'GivenName', u'Testaren Test'), (u'Surname', u'Testsson')])), (u'OfficialAddress', OrderedDict([(u'Address2', u'\xd6RGATAN 79 LGH 10'), (u'PostalCode', u'12345'), (u'City', u'LANDET')])) ]) self.client = self.app.test_client() self.oidc_provider_config = { 'authorization_endpoint': 'https://example.com/op/authentication', 'claims_parameter_supported': True, 'grant_types_supported': ['authorization_code', 'implicit'], 'id_token_signing_alg_values_supported': ['RS256'], 'issuer': 'https://example.com/op/', 'jwks_uri': 'https://example.com/op/jwks', 'response_modes_supported': ['query', 'fragment'], 'response_types_supported': ['code', 'code id_token', 'code token', 'code id_token token'], 'scopes_supported': ['openid'], 'subject_types_supported': ['pairwise'], 'token_endpoint': 'https://example.com/op/token', 'token_endpoint_auth_methods_supported': ['client_secret_basic'], 'userinfo_endpoint': 'https://example.com/op/userinfo' } class MockResponse(object): def __init__(self, status_code, text): self.status_code = status_code self.text = text self.oidc_provider_config_response = MockResponse( 200, json.dumps(self.oidc_provider_config)) # Replace user with one without previous proofings userdata = deepcopy(NEW_USER_EXAMPLE) del userdata['nins'] user = User(data=userdata) user.modified_ts = True self.app.central_userdb.save(user, check_sync=False)
def setUp(self): super(AppTests, self).setUp() self.test_user_eppn = 'hubba-bubba' self.test_user_nin = '200001023456' self.mock_address = OrderedDict([ (u'Name', OrderedDict([(u'GivenNameMarking', u'20'), (u'GivenName', u'Testaren Test'), (u'Surname', u'Testsson')])), (u'OfficialAddress', OrderedDict([(u'Address2', u'\xd6RGATAN 79 LGH 10'), (u'PostalCode', u'12345'), (u'City', u'LANDET')])) ]) self.client = self.app.test_client() # Replace user with one without previous proofings userdata = deepcopy(NEW_USER_EXAMPLE) del userdata['nins'] user = User(data=userdata) user.modified_ts = True self.app.central_userdb.save(user, check_sync=False)