A bit of pep8 and small typo fix.
authorElrond <elrond+mediagoblin.org@samba-tng.org>
Sat, 18 May 2013 23:14:46 +0000 (01:14 +0200)
committerElrond <elrond+mediagoblin.org@samba-tng.org>
Mon, 20 May 2013 17:35:16 +0000 (19:35 +0200)
mediagoblin/plugins/piwigo/tools.py
mediagoblin/tests/test_piwigo.py

index 400be615352dd1841d254bd57c6cb50f832b897d..f060e9f8c54dd2f91f4e912c67ee4b6486adb0ef 100644 (file)
@@ -113,7 +113,7 @@ def check_form(form):
     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 = []
@@ -140,7 +140,7 @@ class PWGSession(object):
         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
index 18f95057eba9fc71cc864aa8c48db1e3c13fc498..71d36ddbe57ad96348506ea0b22ae71898923aa6 100644 (file)
@@ -56,7 +56,7 @@ class Test_PWG(object):
 
         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 \