def setUp(self): self.app = app.test_client() self.posted_message = { 'msg_from': '07d672bc-497b-448f-a406-a20a7e6013d7', 'msg_to': ['GROUP'], 'subject': 'test-subject', 'body': 'test-body', 'thread_id': '', 'ru_id': 'testru', 'survey': 'testsurvey', 'collection_case': 'testcase' } self.sent_message_response = { 'msg_id': '36f3133c-9ead-4168-a40e-f07947671b02', 'status': '201', 'thread_id': '8caeff79-6067-4f2a-96e0-08617fdeb496' } auth_string = base64.b64encode( bytes( f"{app.config['SECURITY_USER_NAME']}:{app.config['SECURITY_USER_PASSWORD']}", 'ascii')).decode("ascii") self.headers = { 'Authorization': f'Basic {auth_string}', 'Content-Type': 'application/json', 'jwt': encoded_jwt, }
def setUp(self): self.app = app.test_client() auth_string = base64.b64encode( bytes( f"{app.config['SECURITY_USER_NAME']}:{app.config['SECURITY_USER_PASSWORD']}", 'ascii')).decode("ascii") self.headers = { 'Authorization': f'Basic {auth_string}', 'Content-Type': 'application/json', } self.iac_response = { "iac": "test_enrolment", "active": True, "lastUsedDateTime": "2017-05-15T10:00:00Z", "caseId": "test_case_id", "questionSet": "H1" } self.registration_form = { "enrolmentCode": "test_enrolment", "emailAddress": "*****@*****.**", "password": "******", "telephone": "0202020202", "firstName": "Andrew", "lastName": "Millar" }
def setUp(self): self.app = app.test_client() auth_string = base64.b64encode( bytes( f"{app.config['SECURITY_USER_NAME']}:{app.config['SECURITY_USER_PASSWORD']}", 'ascii')).decode("ascii") self.headers = { 'Authorization': f'Basic {auth_string}', 'Content-Type': 'application/json', }
def setUp(self): self.app = app.test_client() auth_string = base64.b64encode( bytes(f"{app.config['SECURITY_USER_NAME']}:{app.config['SECURITY_USER_PASSWORD']}", 'ascii') ).decode("ascii") self.headers = { 'Authorization': f'Basic {auth_string}', 'Content-Type': 'application/json', } self.iac_response = { "iac": "test_enrolment", "active": True, "lastUsedDateTime": "2017-05-15T10:00:00Z", "caseId": "test_case_id", "questionSet": "H1" }
def setUp(self): self.app = app.test_client() auth_string = base64.b64encode( bytes( f"{app.config['SECURITY_USER_NAME']}:{app.config['SECURITY_USER_PASSWORD']}", 'ascii')).decode("ascii") self.headers = { 'Authorization': f'Basic {auth_string}', 'Content-Type': 'application/json', } self.posted_form = {'username': '******'} self.oauth2_response = { 'id': 1, 'access_token': '99a81f9c-e827-448b-8fa7-d563b76137ca', 'expires_in': 3600, 'token_type': 'Bearer', 'scope': '', 'refresh_token': 'a74fd471-6981-4503-9f59-00d45d339a15' } self.oauth2_error = {'detail': 'test error'}
def setUp(self): self.app = app.test_client()
def setUp(self): self.app = app.test_client() self.headers = basic_auth_header()
def setUp(self): self.app = app.test_client() self.headers = basic_auth_header() self.ci_data = dict(file=(io.BytesIO(b'my file contents'), "testfile.xlsx"))