[Greater-commits] r270 - trunk/GREAT-ER-DB/impl/postgresql/test
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Jun 27 11:14:43 CEST 2011
Author: bricks
Date: 2011-06-27 11:14:43 +0200 (Mon, 27 Jun 2011)
New Revision: 270
Modified:
trunk/GREAT-ER-DB/impl/postgresql/test/test_pg_a_res.py
Log:
Fix indentation
Modified: trunk/GREAT-ER-DB/impl/postgresql/test/test_pg_a_res.py
===================================================================
--- trunk/GREAT-ER-DB/impl/postgresql/test/test_pg_a_res.py 2011-06-27 09:14:11 UTC (rev 269)
+++ trunk/GREAT-ER-DB/impl/postgresql/test/test_pg_a_res.py 2011-06-27 09:14:43 UTC (rev 270)
@@ -56,56 +56,56 @@
print self.connection_target
da_db_connect("anonym", "123", self.connection_target)
- def test_0_insert_res(self):
- res_record = DA_S_res({'res_id':0,'river_factor':'1000','river_unit':'g/l','stp_factor':'1','stp_unit':'mg/l','pec_initial':'for the result CsimMean [ug/L] the PECinitial value computes to : 124,56 [ug/L]','pec_catch':'For the result CsimMean [ug/L] the PECcatchment value computes to: 40,2 [ug/L]','remark':'These results very send to Mr. Smith for analysis'})
- self.res = da_insert_res(101,res_record)
- da_db_commit()
- self.assertEquals(self.res,None)
+ def test_0_insert_res(self):
+ res_record = DA_S_res({'res_id':0,'river_factor':'1000','river_unit':'g/l','stp_factor':'1','stp_unit':'mg/l','pec_initial':'for the result CsimMean [ug/L] the PECinitial value computes to : 124,56 [ug/L]','pec_catch':'For the result CsimMean [ug/L] the PECcatchment value computes to: 40,2 [ug/L]','remark':'These results very send to Mr. Smith for analysis'})
+ self.res = da_insert_res(101,res_record)
+ da_db_commit()
+ self.assertEquals(self.res,None)
- res_stretch_record = DA_S_res_stretch({'res_stretch_id':0,'res_id':102,'stretch_id':1,'field_id':'Ws','block_id':'SUBST','block_recno':1,'value':'1000','dist_type':'0','remark':'Monte Carlo Shots number value'})
- self.res = da_insert_res_stretch(res_stretch_record)
- da_db_commit()
- self.assertEquals(self.res,None)
+ res_stretch_record = DA_S_res_stretch({'res_stretch_id':0,'res_id':102,'stretch_id':1,'field_id':'Ws','block_id':'SUBST','block_recno':1,'value':'1000','dist_type':'0','remark':'Monte Carlo Shots number value'})
+ self.res = da_insert_res_stretch(res_stretch_record)
+ da_db_commit()
+ self.assertEquals(self.res,None)
- res_disch_record = DA_S_res_disch({'res_disch_id':0,'res_id':102,'disch_id':1,'field_id':'Ws','block_id':'SUBST','block_recno':1,'value':'1000','dist_type':'0','remark':'Monte Carlo Shots number value'})
- self.res = da_insert_res_disch(res_disch_record)
- da_db_commit()
- self.assertEquals(self.res,None)
+ res_disch_record = DA_S_res_disch({'res_disch_id':0,'res_id':102,'disch_id':1,'field_id':'Ws','block_id':'SUBST','block_recno':1,'value':'1000','dist_type':'0','remark':'Monte Carlo Shots number value'})
+ self.res = da_insert_res_disch(res_disch_record)
+ da_db_commit()
+ self.assertEquals(self.res,None)
def test_1_get_res(self):
- # the res_data, that was inserted by the insert.sql
- # script, was already deleted by the sess_data, that
- # linked to it.
- self.res = da_get_res(102)
- self.assertNotEquals(len(self.res),0)
- self.res = da_get_res(103)
- self.assertEquals(len(self.res),0)
- self.res = da_get_res(-1)
- self.assertNotEquals(len(self.res),0)
- self.res = da_get_res(-2)
- self.assertEquals(len(self.res),0)
+ # the res_data, that was inserted by the insert.sql
+ # script, was already deleted by the sess_data, that
+ # linked to it.
+ self.res = da_get_res(102)
+ self.assertNotEquals(len(self.res),0)
+ self.res = da_get_res(103)
+ self.assertEquals(len(self.res),0)
+ self.res = da_get_res(-1)
+ self.assertNotEquals(len(self.res),0)
+ self.res = da_get_res(-2)
+ self.assertEquals(len(self.res),0)
- self.res = da_get_res_stretch(102,102)
- self.assertNotEquals(len(self.res),0)
- self.res = da_get_res_stretch(102,103)
- self.assertEquals(len(self.res),0)
- self.res = da_get_res_stretch(101,101)
- self.assertEquals(len(self.res),0)
- self.res = da_get_res_stretch(102,-1)
- self.assertNotEquals(len(self.res),0)
- self.res = da_get_res_stretch(102,-2)
- self.assertEquals(len(self.res),0)
+ self.res = da_get_res_stretch(102,102)
+ self.assertNotEquals(len(self.res),0)
+ self.res = da_get_res_stretch(102,103)
+ self.assertEquals(len(self.res),0)
+ self.res = da_get_res_stretch(101,101)
+ self.assertEquals(len(self.res),0)
+ self.res = da_get_res_stretch(102,-1)
+ self.assertNotEquals(len(self.res),0)
+ self.res = da_get_res_stretch(102,-2)
+ self.assertEquals(len(self.res),0)
- self.res = da_get_res_disch(102,102)
- self.assertNotEquals(len(self.res),0)
- self.res = da_get_res_disch(102,103)
- self.assertEquals(len(self.res),0)
- self.res = da_get_res_disch(101,101)
- self.assertEquals(len(self.res),0)
- self.res = da_get_res_disch(102,-1)
- self.assertNotEquals(len(self.res),0)
- self.res = da_get_res_disch(102,-2)
- self.assertEquals(len(self.res),0)
+ self.res = da_get_res_disch(102,102)
+ self.assertNotEquals(len(self.res),0)
+ self.res = da_get_res_disch(102,103)
+ self.assertEquals(len(self.res),0)
+ self.res = da_get_res_disch(101,101)
+ self.assertEquals(len(self.res),0)
+ self.res = da_get_res_disch(102,-1)
+ self.assertNotEquals(len(self.res),0)
+ self.res = da_get_res_disch(102,-2)
+ self.assertEquals(len(self.res),0)
def test_2_update_res(self):
self.res = da_get_res(102)
More information about the Greater-commits
mailing list