changeset 3891:aff5dd957f35 beta

classmethods should have cls as first argument
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 22 May 2013 03:27:03 +0200
parents f5a1314886ec
children 3a1cf70e0f42
files rhodecode/tests/api/api_base.py
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/tests/api/api_base.py	Wed May 22 03:17:42 2013 +0200
+++ b/rhodecode/tests/api/api_base.py	Wed May 22 03:27:03 2013 +0200
@@ -67,10 +67,10 @@
     REPO_TYPE = None
 
     @classmethod
-    def setUpClass(self):
-        self.usr = UserModel().get_by_username(TEST_USER_ADMIN_LOGIN)
-        self.apikey = self.usr.api_key
-        self.test_user = UserModel().create_or_update(
+    def setUpClass(cls):
+        cls.usr = UserModel().get_by_username(TEST_USER_ADMIN_LOGIN)
+        cls.apikey = cls.usr.api_key
+        cls.test_user = UserModel().create_or_update(
             username='test-api',
             password='test',
             email='test@api.rhodecode.org',
@@ -78,11 +78,11 @@
             lastname='last'
         )
         Session().commit()
-        self.TEST_USER_LOGIN = self.test_user.username
-        self.apikey_regular = self.test_user.api_key
+        cls.TEST_USER_LOGIN = cls.test_user.username
+        cls.apikey_regular = cls.test_user.api_key
 
     @classmethod
-    def teardownClass(self):
+    def teardownClass(cls):
         pass
 
     def setUp(self):