From 8ae1086aca41b878f3f6263470f0c00538d4fb7d Mon Sep 17 00:00:00 2001 From: midnight Date: Thu, 5 Oct 2023 00:00:12 +0300 Subject: [PATCH] code cleaning --- tests/test_miscellaneous.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_miscellaneous.py b/tests/test_miscellaneous.py index d9fdc44..9f754cc 100644 --- a/tests/test_miscellaneous.py +++ b/tests/test_miscellaneous.py @@ -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()}, @@ -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