def test_basic_invalid_person(): bob = Person("Bob B. Johnson") bob.add_source(url="http://example.com") bob.validate() bob.name = None with pytest.raises(ScrapeValueError): bob.validate()
def test_basic_person(): p = Person("Bob B. Bear") p.add_source("http://example.com") assert p.name in str(p) p.validate()