def test_invalid_value(self): predicate = DomainPredicate("upload.pyp.io", None) assert not predicate(None, pretend.stub(domain="pypi.io"))
def test_text(self, value, expected): predicate = DomainPredicate(value, None) assert predicate.text() == expected assert predicate.phash() == expected
def test_when_not_set(self): predicate = DomainPredicate(None, None) assert predicate(None, None)