Skip to content

Commit

Permalink
added env variable to test client
Browse files Browse the repository at this point in the history
  • Loading branch information
ZohebShaikh committed Oct 16, 2024
1 parent a187a51 commit b2a45fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/unit_tests/service/test_rest_api.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import uuid
from collections.abc import Iterator
from dataclasses import dataclass
Expand Down Expand Up @@ -25,10 +26,14 @@

@pytest.fixture
def client_with_authentication() -> Iterator[TestClient]:
os.environ["PKCE_AUTHENTICATION_URL"] = "http://localhost:8080"
os.environ["TOKEN_URL"] = "http://localhost:8080"
with patch("blueapi.service.interface.worker"):
main.setup_runner(use_subprocess=False)
yield TestClient(main.app)
main.teardown_runner()
del os.environ["PKCE_AUTHENTICATION_URL"]
del os.environ["TOKEN_URL"]


@patch("blueapi.service.interface.get_plans")
Expand Down

0 comments on commit b2a45fd

Please sign in to comment.