MCPcopy Create free account
hub / github.com/Pylons/webtest / __init__

Method __init__

webtest/forms.py:417–429  ·  view source on GitHub ↗
(self, response, text, parser_features='html.parser')

Source from the content-addressed store, hash-verified

415 FieldClass = Field
416
417 def __init__(self, response, text, parser_features='html.parser'):
418 self.response = response
419 self.text = text
420 self.html = BeautifulSoup(self.text, parser_features)
421
422 attrs = self.html('form')[0].attrs
423 self.action = attrs.get('action', '')
424 self.method = attrs.get('method', 'GET')
425 self.id = attrs.get('id')
426 self.enctype = attrs.get('enctype',
427 'application/x-www-form-urlencoded')
428
429 self._parse_fields()
430
431 def _parse_fields(self):
432 fields = OrderedDict()

Callers 3

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 3

_parse_fieldsMethod · 0.95
htmlMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected