Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebCourier committed Feb 21, 2024
1 parent 439b2bc commit 56ba026
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions tests/blueprints/test_guards.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def test_guards_get(mocker):
mocker.patch("flask.Blueprint", new=MockBlueprint)
mocker.patch("flask.request", mock_request)
mocker.patch("src.clients.guard_client.GuardClient", new=MockGuardClient)
mocker.patch("opentelemetry.trace.get_tracer_provider")
from src.blueprints.guards import guards, guards_bp

response = guards()
Expand Down
6 changes: 2 additions & 4 deletions tests/blueprints/test_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ def __init__(self):
assert root_bp.routes == ["/", "/health-check"]
text.assert_called_once_with("SELECT count(datid) FROM pg_stat_activity;")
assert mock_pg.db.session.queries == ["SELECT count(datid) FROM pg_stat_activity;"]

assert info_spy.call_count == 1

info_spy.assert_called_once_with("response: ", [(1,)])

info_spy.assert_called_once_with("response: %s", [(1,)])
assert response == { "status": 200, "message": "Ok" }

mocker.resetall()
Expand Down

0 comments on commit 56ba026

Please sign in to comment.