[Greater-commits] r260 - trunk/GREAT-ER-DB/impl/postgresql/test
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Jun 24 10:26:08 CEST 2011
Author: aheinecke
Date: 2011-06-24 10:26:08 +0200 (Fri, 24 Jun 2011)
New Revision: 260
Modified:
trunk/GREAT-ER-DB/impl/postgresql/test/test_pg_l_user.py
Log:
Fix whitespace
Modified: trunk/GREAT-ER-DB/impl/postgresql/test/test_pg_l_user.py
===================================================================
--- trunk/GREAT-ER-DB/impl/postgresql/test/test_pg_l_user.py 2011-06-24 08:25:35 UTC (rev 259)
+++ trunk/GREAT-ER-DB/impl/postgresql/test/test_pg_l_user.py 2011-06-24 08:26:08 UTC (rev 260)
@@ -42,39 +42,46 @@
def setUp(self):
set_api_interface("_dagreater_pg")
self.server = postgressupport.get_test_server()
- self.connection_target = self.server.known_dbs["static_db"].get_connection_target()
- da_db_connect("anonym", "123", self.connection_target)
+ self.connection_target = self.server.known_dbs["static_db"].get_connection_target()
+ da_db_connect("anonym", "123", self.connection_target)
+ # import time
+ # time.sleep(60)
- def test_0_insert_user(self):
- user_record = DA_S_user({'user_id':'hans_wurst','group_id':101,'cre_date':'30-11-2003','mod_date':'29-11-2003','status':'VALID','remark':'Standard User!'})
- self.res = da_insert_user(user_record, "hallo")
- da_db_commit()
- self.assertEquals(self.res,None)
+ def test_0_insert_user(self):
+ user_record = DA_S_user({'user_id':'hans_wurst',
+ 'group_id':101,
+ 'cre_date':'30-11-2003',
+ 'mod_date':'29-11-2003',
+ 'status':'VALID',
+ 'remark':'Standard User!'})
+ self.res = da_insert_user(user_record, "hallo")
+ da_db_commit()
+ self.assertEquals(self.res,None)
def test_1_get_user(self):
- self.res = da_get_user('anonym')
- self.assertNotEquals(len(self.res),0)
- self.res = da_get_user('hans_wurst')
- self.assertNotEquals(len(self.res),0)
- self.res = da_get_user('icjicjab')
- self.assertEquals(len(self.res),0)
+ self.res = da_get_user('anonym')
+ self.assertNotEquals(len(self.res),0)
+ self.res = da_get_user('hans_wurst')
+ self.assertNotEquals(len(self.res),0)
+ self.res = da_get_user('icjicjab')
+ self.assertEquals(len(self.res),0)
def test_2_update_user(self):
- self.user = da_get_user('hans_wurst')
- self.user[0].status = 'INVALID'
- self.res = da_update_user(self.user[0])
- self.assertEquals(self.res,None)
-
+ self.user = da_get_user('hans_wurst')
+ self.user[0].status = 'INVALID'
+ self.res = da_update_user(self.user[0])
+ self.assertEquals(self.res,None)
+
def test_3_delete_user(self):
self.res = da_get_user('hans_wurst')
- self.assertNotEquals(len(self.res),0)
- self.res = da_delete_user('hans_wurst')
- da_db_commit()
- self.res = da_get_user('hans_wurst')
- self.assertEquals(len(self.res),0)
+ self.assertNotEquals(len(self.res),0)
+ self.res = da_delete_user('hans_wurst')
+ da_db_commit()
+ self.res = da_get_user('hans_wurst')
+ self.assertEquals(len(self.res),0)
def tearDown(self):
- da_db_disconnect()
-
+ da_db_disconnect()
+
if __name__ == "__main__":
support.run_tests()
More information about the Greater-commits
mailing list