##// 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 REPO_TYPE = None
67 REPO_TYPE = None
68
68
69 @classmethod
69 @classmethod
70 def setUpClass(self):
70 def setUpClass(cls):
71 self.usr = UserModel().get_by_username(TEST_USER_ADMIN_LOGIN)
71 cls.usr = UserModel().get_by_username(TEST_USER_ADMIN_LOGIN)
72 self.apikey = self.usr.api_key
72 cls.apikey = cls.usr.api_key
73 self.test_user = UserModel().create_or_update(
73 cls.test_user = UserModel().create_or_update(
74 username='test-api',
74 username='test-api',
75 password='test',
75 password='test',
76 email='test@api.rhodecode.org',
76 email='test@api.rhodecode.org',
@@ -78,11 +78,11 b' class BaseTestApi(object):'
78 lastname='last'
78 lastname='last'
79 )
79 )
80 Session().commit()
80 Session().commit()
81 self.TEST_USER_LOGIN = self.test_user.username
81 cls.TEST_USER_LOGIN = cls.test_user.username
82 self.apikey_regular = self.test_user.api_key
82 cls.apikey_regular = cls.test_user.api_key
83
83
84 @classmethod
84 @classmethod
85 def teardownClass(self):
85 def teardownClass(cls):
86 pass
86 pass
87
87
88 def setUp(self):
88 def setUp(self):
General Comments 0
You need to be logged in to leave comments. Login now