Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_text_field_not_exist():
field = TextField(css_select="nothing matched")
try:
field.extract(html_etree=html_etree)
except Exception as e:
assert isinstance(e, NothingMatchedError)
def test_attr_field_not_exist():
field = TextField(css_select="nothing matched")
try:
field.extract(html_etree=html_etree)
except Exception as e:
assert isinstance(e, NothingMatchedError)