Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 6 additions & 34 deletions tests/test_dns_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,62 +37,37 @@ def dns_test_md5s(sample_pii_md5s):
return test_md5s


@pytest.mark.skipif(
not os.getenv("FILLOUT_API_KEY")
or not os.getenv("FILLOUT_DNS_FORM_ID")
or not os.getenv("FILLOUT_DNS_QUESTION_ID"),
reason="Fillout API credentials not found",
)
@pytest.mark.skip(reason="Fillout DNS validator not in use")
def test_fillout_dns_validator_initialization(fillout_dns_validator):
assert fillout_dns_validator.fillout_api_key == os.getenv('FILLOUT_API_KEY')
assert fillout_dns_validator.fillout_form_id == os.getenv('FILLOUT_DNS_FORM_ID')
assert fillout_dns_validator.question_id == os.getenv('FILLOUT_DNS_QUESTION_ID')


@pytest.mark.skipif(
not os.getenv("FILLOUT_API_KEY")
or not os.getenv("FILLOUT_DNS_FORM_ID")
or not os.getenv("FILLOUT_DNS_QUESTION_ID"),
reason="Fillout API credentials not found",
)
@pytest.mark.skip(reason="Fillout DNS validator not in use")
def test_fillout_api_headers(fillout_dns_validator):
expected_headers = {
"Authorization": f"Bearer {os.getenv('FILLOUT_API_KEY')}"
}
assert fillout_dns_validator.fillout_api_headers == expected_headers


@pytest.mark.skipif(
not os.getenv("FILLOUT_API_KEY")
or not os.getenv("FILLOUT_DNS_FORM_ID")
or not os.getenv("FILLOUT_DNS_QUESTION_ID"),
reason="Fillout API credentials not found",
)
@pytest.mark.skip(reason="Fillout DNS validator not in use")
def test_get_submissions(fillout_dns_validator):
submissions = fillout_dns_validator._get_submissions()
assert isinstance(submissions, list)
assert len(submissions) > 0


@pytest.mark.skipif(
not os.getenv("FILLOUT_API_KEY")
or not os.getenv("FILLOUT_DNS_FORM_ID")
or not os.getenv("FILLOUT_DNS_QUESTION_ID"),
reason="Fillout API credentials not found",
)
@pytest.mark.skip(reason="Fillout DNS validator not in use")
def test_all_emails(fillout_dns_validator):
emails = fillout_dns_validator.all_emails()
assert isinstance(emails, set)
assert len(emails) > 0
assert all(isinstance(email, str) for email in emails)


@pytest.mark.skipif(
not os.getenv("FILLOUT_API_KEY")
or not os.getenv("FILLOUT_DNS_FORM_ID")
or not os.getenv("FILLOUT_DNS_QUESTION_ID"),
reason="Fillout API credentials not found",
)
@pytest.mark.skip(reason="Fillout DNS validator not in use")
def test_validate(fillout_dns_validator, dns_test_md5s):
result = fillout_dns_validator.validate(dns_test_md5s)
assert isinstance(result, list)
Expand All @@ -101,10 +76,7 @@ def test_validate(fillout_dns_validator, dns_test_md5s):
assert result[0].md5 == dns_test_md5s[0].md5


@pytest.mark.skipif(
not os.getenv("MONGO_CONNECT_STR"),
reason="MongoDB connection string not found",
)
@pytest.mark.skip(reason="Fillout DNS validator not in use")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test targets MongoDNSValidator, but the skip reason says “Fillout DNS validator not in use”, which is a bit misleading in test reports. Consider updating the skip reason to reference Mongo/DNS validation more generally so it’s clear what’s being skipped.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

def test_mongo_dns_validator(dns_test_md5s):
from pymongo import MongoClient
client = MongoClient(os.getenv("MONGO_CONNECT_STR"))
Expand Down
7 changes: 4 additions & 3 deletions tests/test_events_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def extract_date_from_range(date_str: str) -> str:
raise ValueError(f"Could not extract date from: {date_str}")


@pytest.mark.skip(reason="Scrapybara not in use anymore")
@pytest.mark.skip(reason="Scrapybara fully deprecated, pending removal")
def test_beverly_hills_events_scrapybara(scrapybara_events_generator):
"""Test generating events for Beverly Hills (90210) using Scrapybara."""
try:
Expand Down Expand Up @@ -236,6 +236,7 @@ def dummy_events_response():
)


@pytest.mark.skip(reason="Scrapybara fully deprecated, pending removal")
def test_pdf_generation(scrapybara_events_generator, dummy_events_response):
"""Test generating PDF from events using Scrapybara."""
# Generate PDF using dummy data
Expand All @@ -246,7 +247,7 @@ def test_pdf_generation(scrapybara_events_generator, dummy_events_response):
assert len(pdf_buffer.getvalue()) > 1000, "PDF should have meaningful content"


@pytest.mark.skip(reason="Scrapybara not in use anymore")
@pytest.mark.skip(reason="Scrapybara fully deprecated, pending removal")
def test_invalid_zip_code_scrapybara(scrapybara_events_generator):
"""Test generation with invalid zip code for Scrapybara."""
# Test non-string zip code
Expand All @@ -266,7 +267,7 @@ def test_invalid_zip_code_scrapybara(scrapybara_events_generator):
scrapybara_events_generator.generate("abcde")


@pytest.mark.skip(reason="Scrapybara not in use anymore")
@pytest.mark.skip(reason="Scrapybara fully deprecated, pending removal")
def test_invalid_api_key_scrapybara():
"""Test initialization with invalid API key for Scrapybara."""
# Test non-string API key
Expand Down