Skip to content

Commit 6849f64

Browse files
committed
IDEV-2063: Add tests.
1 parent 746009a commit 6849f64

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/test_api.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,3 +663,23 @@ def test_feeds_endpoint_should_raise_error_if_asked_csv_format_for_download_api(
663663
feeds_api.domaindiscovery(after="-60", output_format="csv", endpoint="download")
664664

665665
assert str(excinfo.value) == "csv format is not available in download API."
666+
667+
668+
@vcr.use_cassette
669+
def test_domain_hotlist():
670+
results = feeds_api.domainhotlist(after="-60", header_authentication=False)
671+
for response in results.response():
672+
assert results.status == 200
673+
674+
rows = response.strip().split("\n")
675+
assert response is not None
676+
assert len(rows) >= 1
677+
678+
for row in rows:
679+
feed_result = json.loads(row)
680+
assert "timestamp" in feed_result.keys()
681+
assert "domain" in feed_result.keys()
682+
assert "phising" in feed_result.keys()
683+
assert "malware" in feed_result.keys()
684+
assert "proximity" in feed_result.keys()
685+
assert "overall" in feed_result.keys()

0 commit comments

Comments
 (0)