##// END OF EJS Templates
classmethods should have cls as first argument
marcink -
r3891:aff5dd95 beta
parent child Browse files
Show More
@@ -67,10 +67,10 b' class BaseTestApi(object):'
67 67 REPO_TYPE = None
68 68
69 69 @classmethod
70 def setUpClass(self):
71 self.usr = UserModel().get_by_username(TEST_USER_ADMIN_LOGIN)
72 self.apikey = self.usr.api_key
73 self.test_user = UserModel().create_or_update(
70 def setUpClass(cls):
71 cls.usr = UserModel().get_by_username(TEST_USER_ADMIN_LOGIN)
72 cls.apikey = cls.usr.api_key
73 cls.test_user = UserModel().create_or_update(
74 74 username='test-api',
75 75 password='test',
76 76 email='test@api.rhodecode.org',
@@ -78,11 +78,11 b' class BaseTestApi(object):'
78 78 lastname='last'
79 79 )
80 80 Session().commit()
81 self.TEST_USER_LOGIN = self.test_user.username
82 self.apikey_regular = self.test_user.api_key
81 cls.TEST_USER_LOGIN = cls.test_user.username
82 cls.apikey_regular = cls.test_user.api_key
83 83
84 84 @classmethod
85 def teardownClass(self):
85 def teardownClass(cls):
86 86 pass
87 87
88 88 def setUp(self):
General Comments 0
You need to be logged in to leave comments. Login now