changeset 5962:2ffd56ea2629

tests: small setup method refactor for readability
author Mads Kiilerich <madski@unity3d.com>
date Fri, 10 Jun 2016 01:19:58 +0200
parents 304e83e9bcde
children 85bb68f64597
files kallithea/tests/models/test_notifications.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/tests/models/test_notifications.py	Fri Jun 10 01:19:58 2016 +0200
+++ b/kallithea/tests/models/test_notifications.py	Fri Jun 10 01:19:58 2016 +0200
@@ -11,19 +11,19 @@
 
     def setup_method(self, method):
         Session.remove()
-        self.u1 = UserModel().create_or_update(username=u'u1',
+        u1 = UserModel().create_or_update(username=u'u1',
                                         password=u'qweqwe',
                                         email=u'u1@example.com',
                                         firstname=u'u1', lastname=u'u1')
         Session().commit()
-        self.u1 = self.u1.user_id
+        self.u1 = u1.user_id
 
-        self.u2 = UserModel().create_or_update(username=u'u2',
+        u2 = UserModel().create_or_update(username=u'u2',
                                         password=u'qweqwe',
                                         email=u'u2@example.com',
                                         firstname=u'u2', lastname=u'u3')
         Session().commit()
-        self.u2 = self.u2.user_id
+        self.u2 = u2.user_id
 
         self.u3 = UserModel().create_or_update(username=u'u3',
                                         password=u'qweqwe',