Fix Sonar issue, formatting (#99)
* Fix Sonar issue, formatting * Remove dev dependencies from requirements.tzt * 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
|
||||
|
||||
@ -39,7 +39,7 @@ def test_get_ip_information_bad_response() -> None:
|
||||
def test_get_autonomous_system_number() -> None:
|
||||
"""TEST: ensure that AS information is parsed into AS number correctly."""
|
||||
as_info = "AS5089 Virgin Media Limited"
|
||||
as_number = get_autonomous_system_number(as_info)
|
||||
as_number: str = get_autonomous_system_number(as_info)
|
||||
assert as_number == "AS5089"
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user