File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6666 "gitlens.ai.enabled" : false ,
6767 "python.testing.unittestEnabled" : false ,
6868 "python.testing.pytestEnabled" : true ,
69- "python.envFile" : " ${workspaceFolder}/.env.test " ,
69+ "python.envFile" : " ${workspaceFolder}/.env" ,
7070 "git.enableCommitSigning" : true ,
7171 "sonarlint.connectedMode.project" : {
7272 "connectionId" : " nhsdigital" ,
Original file line number Diff line number Diff line change 44import os
55from collections .abc import Callable
66from datetime import timedelta
7+ from pathlib import Path
78from typing import Any , cast
89
910import pytest
1011import requests
12+ from dotenv import load_dotenv
1113from fhir .constants import FHIRSystem
1214
1315DEFAULT_REQUEST_HEADERS = {
1719}
1820
1921
22+ def _load_test_env_file () -> None :
23+ """Load repository-level test env vars for VS Code pytest runs."""
24+ workspace_root = Path (__file__ ).resolve ().parents [2 ]
25+ test_env_file = workspace_root / ".env.test"
26+ load_dotenv (dotenv_path = test_env_file , override = True )
27+
28+
29+ _load_test_env_file ()
30+
31+
2032SIMPLE_PAYLOAD = {
2133 "resourceType" : "Parameters" ,
2234 "parameter" : [
You can’t perform that action at this time.
0 commit comments