diff rhodecode/tests/models/test_users.py @ 3647:8a86836fad64 beta

more usage of fixture tools in tests
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 01 Apr 2013 23:45:25 +0200
parents fa6ba6727475
children 7e3d89d9d3a2
line wrap: on
line diff
--- a/rhodecode/tests/models/test_users.py	Sun Mar 31 21:44:27 2013 +0200
+++ b/rhodecode/tests/models/test_users.py	Mon Apr 01 23:45:25 2013 +0200
@@ -14,6 +14,9 @@
         Session.remove()
         super(TestUser, self).__init__(methodName=methodName)
 
+    def tearDown(self):
+        Session.remove()
+
     def test_create_and_remove(self):
         usr = UserModel().create_or_update(username=u'test_user',
                                            password=u'qweqwe',
@@ -99,6 +102,7 @@
 
         UserModel().delete(self.u1)
         Session().commit()
+        Session.remove()
 
     def test_add_perm(self):
         perm = Permission.query().all()[0]