Skip to content

Commit

Permalink
Fix typos and tidy up grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchrisadams committed Jul 27, 2023
1 parent 24b9de6 commit d1ae2c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apps/greencheck/tests/test_api_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d1ae2c1

Please sign in to comment.