Skip to content

Commit

Permalink
code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Midnight95 committed Oct 4, 2023
1 parent 8ce5b2c commit 8ae1086
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_miscellaneous.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from page_analyzer.config import *
from page_analyzer.config import get_last_status_codes
from datetime import date


def test_get_last_status_codes():
# Test case 1: Ensuring the returned dictionary has the latest status codes for each URL
checks = [
{'id': 1, 'url_id': 1, 'status_code': 200, 'created_at': date.today()},
{'id': 2, 'url_id': 1, 'status_code': 404, 'created_at': date.today()},
Expand All @@ -15,7 +15,6 @@ def test_get_last_status_codes():
assert get_last_status_codes(checks) == expected_result


# Helper class for mocking the page response object
class MockPage:
def __init__(self, content, status_code=200):
self.text = content
Expand Down

0 comments on commit 8ae1086

Please sign in to comment.