Skip to content

Commit

Permalink
#85 Code review: remove unnecessary mock from test
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanKJSchreurs committed Jan 18, 2023
1 parent 526cca9 commit ad0ab9c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,17 +257,14 @@ def test_service_types_simple_cached(
requests_mock,
):
"""Scenario: The service_types call is cached:
When we get the service types several times, the second call that happens before the cache expires,
doesn't hit the backend.
But the third call that happens that happens after the cache has expired does hit the backend again.
When we get the service types several times, the second call that happens before the cache expires,
doesn't hit the backend.
But the third call that happens after the cache has expired does hit the backend again.
"""
# Aggregator checks if the backend supports GET /service_types, so we have to mock that up too.
requests_mock.get(
backend1 + "/", json=JSON_CAPABILITIES_WITH_SERVICE_TYPES_SUPPORTED
)
requests_mock.get(
backend2 + "/", json=JSON_CAPABILITIES_WITH_SERVICE_TYPES_SUPPORTED
)
# Just need one service type for the test.
single_service_type = self.SERVICE_TYPES_ONLT_WMTS
mock_be1 = requests_mock.get(
Expand Down

0 comments on commit ad0ab9c

Please sign in to comment.