New paste Repaste Download
client = <FlaskClient <Flask 'app'>>
tokens = {'access_token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmcmVzaCI6ZmFsc2UsImlhdCI6MTcyMDgwNTE1NCwianRpIjoiMTc0MzQzODQ...dRamZHbDFpV0dOVG9PVzJUMGl1UVBmVFpkalk3VkNXbzV3Z3VORlV3VlU3b3htTXM1SVk9In0._CZab-uj1-o56Jf_3-uUOgWwfKwoIfHPERdHgZ5vK1k'}
work_flow_cache = {'contract_type': '4ad08532574942e39dc9b1ef6475ec00', 'functions': {'redline': {'platform': {'function_id': 'f5f6941da..., ...]}}}, 'new_user_id': 'acab62dbdb1e497a922163313908e0b2', 'permission_id': '96db402e6fd44f36a613ce3d0a52078d', ...}
    def test_update_redline_function(
        client: FlaskClient,
        tokens: Dict[str, str],
        work_flow_cache: Dict,
    ):
        token = tokens["access_token"]
        function_id = work_flow_cache["functions"]["redline"]["platform"]["function_id"]
        result = client.patch(
            path=f"/v1/functions/redline/{function_id}",
            json={
                "framework": "platform",
                "rule_answers": [
                    {
                        "rule_id": rule["master_id"],
                        "answers": [
                            {"variable": "TEST", "value": "30 Days"},
                        ],
                    }
                    for rule in work_flow_cache["functions"]["redline"]["platform"]["rules"]
                ],
            },
            headers={
                "Authorization": f"Bearer {token}",
                "Content-Type": "application/json",
            },
        )
>       assert result.status_code == 200
E       assert 500 == 200
E        +  where 500 = <WrapperTestResponse streamed [500 INTERNAL SERVER ERROR]>.status_code
tests/test_11_platform_function_workflow.py:226: AssertionError
Filename: None. Size: 2kb. View raw, , hex, or download this file.

This paste expires on 2024-07-19 17:26:13.359304. Pasted through deprecated-web.