Skip to content

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rodgerjohnson committed Mar 12, 2024
1 parent 218f86d commit baa67a4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/test_exporter.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Tests the exporter module"""
from unittest import TestCase, mock

from exporter import return200, return404, exporter
from exporter import return200, return404, exporter, liveness


class TestExporter(TestCase):
Expand Down Expand Up @@ -34,16 +34,16 @@ def test_exporter_readiness(self):
"""Tests that the readiness path invokes return200
with the environ and HTTP response callable"""
environ = {'PATH_INFO': '/readiness'}
with mock.patch('exporter.return200') as mocked:
exporter(environ, self.start_fn_mock)
with mock.patch('liveness.return200') as mocked:
liveness(environ, self.start_fn_mock)
mocked.assert_called_once_with(environ, self.start_fn_mock)

def test_exporter_liveness(self):
"""Tests that the liveness path invokes return200
with the environ and HTTP response callable"""
environ = {'PATH_INFO': '/liveness'}
with mock.patch('exporter.return200') as mocked:
exporter(environ, self.start_fn_mock)
with mock.patch('liveness.return200') as mocked:
liveness(environ, self.start_fn_mock)
mocked.assert_called_once_with(environ, self.start_fn_mock)

def test_exporter_404(self):
Expand Down

0 comments on commit baa67a4

Please sign in to comment.