if not form.validate():
_log.error("form validation failed for form %r", form)
for f in form:
- if len(f.error):
+ if len(f.errors):
_log.error("Errors for %s: %r", f.name, f.errors)
raise BadRequest()
dump = []
self.in_pwg_session = True
return self
- def __exit__(self, *args):
+ def __exit__(self, *args):
# Restore state
self.request.session = self.old_session
self.request.user = self.old_user
resp = self.do_post("pwg.session.login",
{"username": self.username, "password": self.password})
- assert resp.body == XML_PREFIX + '<rsp stat="ok">1</rsp>'
+ assert resp.body == XML_PREFIX + '<rsp stat="ok">1</rsp>'
resp = self.do_get("pwg.session.getStatus")
assert resp.body == XML_PREFIX \