Exemplo n.º 1
0
 def test_invalid_value(self):
     predicate = DomainPredicate("upload.pyp.io", None)
     assert not predicate(None, pretend.stub(domain="pypi.io"))
Exemplo n.º 2
0
 def test_text(self, value, expected):
     predicate = DomainPredicate(value, None)
     assert predicate.text() == expected
     assert predicate.phash() == expected
Exemplo n.º 3
0
 def test_when_not_set(self):
     predicate = DomainPredicate(None, None)
     assert predicate(None, None)
Exemplo n.º 4
0
 def test_text(self, value, expected):
     predicate = DomainPredicate(value, None)
     assert predicate.text() == expected
     assert predicate.phash() == expected