Skip to content

Commit

Permalink
Linter
Browse files Browse the repository at this point in the history
  • Loading branch information
hweawer committed Oct 3, 2024
1 parent 60affa2 commit 2e3fced
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/metrics/test_healthcheck_server.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=protected-access
import unittest
from datetime import datetime, timedelta
from http import HTTPStatus
Expand All @@ -18,7 +19,7 @@ class TestPulseFunction(unittest.TestCase):
@patch('src.variables.HEALTHCHECK_SERVER_PORT', 8000)
def test_pulse_success(self, mock_request):
"""Test that pulse successfully pings the healthcheck server."""
mock_request.get(f'http://localhost:8000/pulse/', status_code=HTTPStatus.OK)
mock_request.get('http://localhost:8000/pulse/', status_code=HTTPStatus.OK)

with patch('logging.Logger.warning') as mock_warning:
pulse()
Expand All @@ -28,7 +29,7 @@ def test_pulse_success(self, mock_request):
@patch('src.variables.HEALTHCHECK_SERVER_PORT', 8000)
def test_pulse_server_not_responding(self, mock_request):
"""Test that pulse logs a warning when the server is not responding."""
mock_request.get(f'http://localhost:8000/pulse/', exc=requests.ConnectionError)
mock_request.get('http://localhost:8000/pulse/', exc=requests.ConnectionError)

with patch('logging.Logger.warning') as mock_warning:
pulse()
Expand Down

0 comments on commit 2e3fced

Please sign in to comment.