"""Conftest.""" import pytest @pytest.fixture def mock_event(): """Mock event.""" return { 'ClientRequestToken': 'D30B2FA8-BB34-4217-8B06-DDA1EA309557', 'SecretId': 'arn:aws:secretsmanager:us-east-1:437795906767:secret:qa/ows-payee/payoneer_auth_token-cce8C9', # noqa 'Step': 'createSecret', } @pytest.fixture def mock_payoneer_auth_success_response(): """Sample Payoneer success response.""" return { 'token_type': 'Bearer', 'access_token': 'AccessTokenFromPayoneer123', 'expires_in': 2592000, 'consented_on': 1575396682, 'scope': 'read write', 'refresh_token': None, 'refresh_token_expires_in': 0, 'id_token': None, 'error': None, 'error_description': None, } @pytest.fixture def mock_payoneer_auth_error_response(): """Sample Payoneer error response.""" return { 'Errors': { 'client_id': 'client_id.Required', 'client_secret': 'client_secret.Required' }, 'ErrorParams': None, 'ApplicationErrorCode': 1010 } @pytest.fixture def mock_payoneer_api_success_response(): """Sample Payoneer test request response.""" return { 'result': { 'balance': 9325627.69, 'currency': 'USD', 'fees_due': 65283.48 } } @pytest.fixture def mock_payoneer_api_error_response(): """Sample Payoneer test request response.""" return { 'error': 'Not Found', 'error_description': 'The requested resource could not be found', 'error_details': { 'code': 404, 'sub_code': None } }