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