This commit is contained in:
@@ -5,6 +5,7 @@ from django.utils import timezone
|
||||
|
||||
from apps.sources.models import Source, SourcePolicyReview
|
||||
from apps.sources.services.policy import assess_url, create_policy_review, is_denied_domain
|
||||
from apps.sources.services.robots import RobotsDecision
|
||||
|
||||
|
||||
def test_platform_domains_are_denied_including_subdomains():
|
||||
@@ -74,7 +75,11 @@ def test_policy_conflict_denies_even_when_allow_policy_set(db):
|
||||
|
||||
|
||||
@pytest.mark.security
|
||||
def test_trial_review_can_allow_fetch(db):
|
||||
def test_trial_review_can_allow_fetch(db, monkeypatch):
|
||||
monkeypatch.setattr(
|
||||
"apps.sources.services.policy.assess_robots",
|
||||
lambda *args, **kwargs: RobotsDecision(True, "Testrobots staan toegang toe"),
|
||||
)
|
||||
source = Source.objects.create(
|
||||
name="Example jobs",
|
||||
source_type=Source.Type.EMPLOYER,
|
||||
|
||||
Reference in New Issue
Block a user