Fix unit test failure
This commit is contained in:
@@ -5,15 +5,15 @@
|
||||
import requests_mock
|
||||
|
||||
from app.ip_info import ( # pragma: no cover
|
||||
get_ip_information,
|
||||
get_autonomous_system_number,
|
||||
get_ip_information,
|
||||
get_prefix_information,
|
||||
)
|
||||
|
||||
|
||||
def test_get_ip_information() -> None:
|
||||
"""TEST: ensure that the IP information API is working correctly."""
|
||||
test_query = "1.2.3.4"
|
||||
test_query: str = "1.2.3.4"
|
||||
ip_info = get_ip_information(test_query)
|
||||
assert ip_info.get("status") == "success" and ip_info.get("query") == test_query
|
||||
|
||||
|
@@ -31,7 +31,7 @@ def test_resolve_domain_name_true() -> None:
|
||||
"""TEST: Verifies that DNS resolution is working correctly."""
|
||||
domain_name = "one.one.one.one"
|
||||
expected_results: list[str] = ["1.1.1.1", "1.0.0.1"] # Could resolve to either IP
|
||||
assert resolve_domain_name(domain_name) in expected_results
|
||||
assert str(resolve_domain_name(domain_name)) in expected_results
|
||||
|
||||
|
||||
def test_resolve_domain_name_false() -> None:
|
||||
|
Reference in New Issue
Block a user