[Greater-commits] r263 - trunk/GREAT-ER-DB/impl/postgresql/test
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Jun 24 10:29:02 CEST 2011
Author: aheinecke
Date: 2011-06-24 10:29:02 +0200 (Fri, 24 Jun 2011)
New Revision: 263
Modified:
trunk/GREAT-ER-DB/impl/postgresql/test/test_pg_j_sess.py
Log:
Fix whitespace before editing
Modified: trunk/GREAT-ER-DB/impl/postgresql/test/test_pg_j_sess.py
===================================================================
--- trunk/GREAT-ER-DB/impl/postgresql/test/test_pg_j_sess.py 2011-06-24 08:27:49 UTC (rev 262)
+++ trunk/GREAT-ER-DB/impl/postgresql/test/test_pg_j_sess.py 2011-06-24 08:29:02 UTC (rev 263)
@@ -48,65 +48,65 @@
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)
- def test_0_insert_sess_sess_disch(self):
- sess_record = DA_S_sess({'sess_id':0,'catch_id':101,'subst_id':101,'env_id':101,'market_id':101,'mod_id':101,'res_id':101,'sess_disch_id':101,'name':'sess239847','user_id':'anonym','cre_date':'30-01-2003','mod_date':'29-01-2003','status':'ready','privs':6, 'is_temp_sess':'Y','temp_sess_src_id':212,'temp_sess_db_sid':'','remark':'remark_string here!'})
- self.res = da_insert_sess(sess_record)
- da_db_commit()
- self.assertEquals(self.res,None)
-
- sess_disch_record = DA_S_sess_disch({'sess_disch_id':0,'disch_id':1,'stretch_id':1,'catch_id':101,'disch_class_id':10,'name':'sess_disch392841','user_id':'anonym','cre_date':'30-11-2003','mod_date':'29-11-2003','status':'ready','privs':6, 'pop':'Ysdik','dwf':'asouasuh','flow_val':'1234','flow_dist':'asuh','flow_dom':'25253','flow_nondom':'sdlk','flow_runoff':'casomi','treated':'dnsvdsvjk','r_wwtp':'sdk','remark':'remark_string here!'})
- self.res = da_insert_sess_disch(101, sess_disch_record)
- da_db_commit()
- self.assertEquals(self.res,None)
+ def test_0_insert_sess_sess_disch(self):
+ sess_record = DA_S_sess({'sess_id':0,'catch_id':101,'subst_id':101,'env_id':101,'market_id':101,'mod_id':101,'res_id':101,'sess_disch_id':101,'name':'sess239847','user_id':'anonym','cre_date':'30-01-2003','mod_date':'29-01-2003','status':'ready','privs':6, 'is_temp_sess':'Y','temp_sess_src_id':212,'temp_sess_db_sid':'','remark':'remark_string here!'})
+ self.res = da_insert_sess(sess_record)
+ da_db_commit()
+ self.assertEquals(self.res,None)
+ sess_disch_record = DA_S_sess_disch({'sess_disch_id':0,'disch_id':1,'stretch_id':1,'catch_id':101,'disch_class_id':10,'name':'sess_disch392841','user_id':'anonym','cre_date':'30-11-2003','mod_date':'29-11-2003','status':'ready','privs':6, 'pop':'Ysdik','dwf':'asouasuh','flow_val':'1234','flow_dist':'asuh','flow_dom':'25253','flow_nondom':'sdlk','flow_runoff':'casomi','treated':'dnsvdsvjk','r_wwtp':'sdk','remark':'remark_string here!'})
+ self.res = da_insert_sess_disch(101, sess_disch_record)
+ da_db_commit()
+ self.assertEquals(self.res,None)
+
def test_1_get_sess_sess_disch(self):
- self.res = da_get_sess(101,'Y')
- self.assertEquals(len(self.res),0)
- self.res = da_get_sess(102,'Y')
- self.assertNotEquals(len(self.res),0)
+ self.res = da_get_sess(101,'Y')
+ self.assertEquals(len(self.res),0)
+ self.res = da_get_sess(102,'Y')
+ self.assertNotEquals(len(self.res),0)
- self.res = da_get_sess_disch(101,1,102)
- self.assertNotEquals(len(self.res),0)
- self.res = da_get_sess_disch(101,1,101)
- self.assertNotEquals(len(self.res),0)
- self.res = da_get_sess_disch(100,1,200)
- self.assertEquals(len(self.res),0)
- self.res = da_get_sess_disch(100,1,100)
- self.assertEquals(len(self.res),0)
- self.res = da_get_sess_disch(100,2,100)
- self.assertEquals(len(self.res),0)
+ self.res = da_get_sess_disch(101,1,102)
+ self.assertNotEquals(len(self.res),0)
+ self.res = da_get_sess_disch(101,1,101)
+ self.assertNotEquals(len(self.res),0)
+ self.res = da_get_sess_disch(100,1,200)
+ self.assertEquals(len(self.res),0)
+ self.res = da_get_sess_disch(100,1,100)
+ self.assertEquals(len(self.res),0)
+ self.res = da_get_sess_disch(100,2,100)
+ self.assertEquals(len(self.res),0)
def test_2_update_sess_sess_disch(self):
- self.sess = da_get_sess(102, 'Y')
- self.sess[0].name = 'UPDATE'
- self.res = da_update_sess(self.sess[0])
- self.assertEquals(self.res,None)
+ self.sess = da_get_sess(102, 'Y')
+ self.sess[0].name = 'UPDATE'
+ self.res = da_update_sess(self.sess[0])
+ self.assertEquals(self.res,None)
- self.sess_disch = da_get_sess_disch(101,1,102)
- self.sess_disch[0].name = 'UPDATE'
- self.res = da_update_sess_disch(self.sess_disch[0])
- self.assertEquals(self.res,None)
+ self.sess_disch = da_get_sess_disch(101,1,102)
+ self.sess_disch[0].name = 'UPDATE'
+ self.res = da_update_sess_disch(self.sess_disch[0])
+ self.assertEquals(self.res,None)
def test_3_delete_sess_sess_disch(self):
self.res = da_get_sess(102,'Y')
- self.assertNotEquals(len(self.res),0)
- self.res = da_delete_sess(102)
- da_db_commit()
- self.res = da_get_sess(102,'Y')
- self.assertEquals(len(self.res),0)
+ self.assertNotEquals(len(self.res),0)
+ self.res = da_delete_sess(102)
+ da_db_commit()
+ self.res = da_get_sess(102,'Y')
+ self.assertEquals(len(self.res),0)
self.res = da_get_sess_disch(101,1,102)
- self.assertNotEquals(len(self.res),0)
- self.res = da_delete_sess_disch(101,1,102)
- da_db_commit()
- self.res = da_get_sess_disch(101,1,102)
- self.assertEquals(len(self.res),0)
+ self.assertNotEquals(len(self.res),0)
+ self.res = da_delete_sess_disch(101,1,102)
+ da_db_commit()
+ self.res = da_get_sess_disch(101,1,102)
+ 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