diff --git a/apps/greencheck/tests/test_api_logger.py b/apps/greencheck/tests/test_api_logger.py index 8ea3c762..28737f1e 100644 --- a/apps/greencheck/tests/test_api_logger.py +++ b/apps/greencheck/tests/test_api_logger.py @@ -15,14 +15,14 @@ def test_api_requests_are_logged(live_server, transactional_db): the live server itself is running. """ - # when: a request has been made to our high traffic endpoint use for most greenchecks + # when: a request has been made to our high traffic endpoint used for most greenchecks res = requests.get(f"{live_server.url}{reverse('asn-list')}") # Note: django api request logger works by logging API requests outside the normal # request lifecycle. By default, it writes to the db every 10 seconds, but the # minimum we can set this to is 1 seconds in testing.DRF_LOGGER_INTERVAL - # and: our api request logging internal has elapsed + # and: our api request logging interval has elapsed time.sleep(1) # then we should see one request logged @@ -37,13 +37,13 @@ def test_high_traffic_api_requests_are_not_logged(live_server): Some receive so much traffic that it would be impractical, for example. """ - # given: a request has been made to our high traffic endpoint use for most greenchecks + # given: a request has been made to the high traffic endpoint use for most greenchecks requests.get(f"{live_server.url}{reverse('green-domain-detail', args=['example.com'])}") - # and: a request our endpoint for generating images - also sees a lot use + # and: a request has been made to our endpoint for generating images - which also sees a lot of use requests.get(f"{live_server.url}{reverse('legacy-greencheck-image', args=['example.com'])}") - # and: our logged has had time to log the requests + # and: our API request logger's logging interval has had time to log the requests time.sleep(1) # then: we should see no logged requests