[gnue] r9831 - in trunk/gnue-common/tests: . drivers

[email protected]
Newsgroups gmane.comp.cms.gnue.cvs
Message-ID <[email protected]>
Author: johannes
Date: 2007-11-27 02:18:42 -0600 (Tue, 27 Nov 2007)
New Revision: 9831

Modified:
   trunk/gnue-common/tests/apps_checktype.py
   trunk/gnue-common/tests/drivers/checkem.py
   trunk/gnue-common/tests/drivers/drivers.gsd
   trunk/gnue-common/tests/drivers/drvcheck.gfd
Log:
Fixed unittests, added master/detail sample


Modified: trunk/gnue-common/tests/apps_checktype.py
===================================================================
--- trunk/gnue-common/tests/apps_checktype.py	2007-11-22 15:53:09 UTC (rev 9830)
+++ trunk/gnue-common/tests/apps_checktype.py	2007-11-27 08:18:42 UTC (rev 9831)
@@ -28,6 +28,7 @@
 #
 
 import unittest
+from types import *
 from gnue.common.apps.checktype import *
 
 class ChecktypeTestCase(unittest.TestCase):
@@ -127,4 +128,4 @@
   suite = unittest.makeSuite(ChecktypeTestCase,'test')
   
 if __name__ == "__main__":
-  unittest.main()
\ No newline at end of file
+  unittest.main()

Modified: trunk/gnue-common/tests/drivers/checkem.py
===================================================================
--- trunk/gnue-common/tests/drivers/checkem.py	2007-11-22 15:53:09 UTC (rev 9830)
+++ trunk/gnue-common/tests/drivers/checkem.py	2007-11-27 08:18:42 UTC (rev 9831)
@@ -88,7 +88,7 @@
     # ------------------------------------------------------------------------
 
     cmd = "UPDATE drvCheck set name = %(name)s WHERE id = %(id)s"
-    params = {'name': u'Fred\xf6 has \u20ac 200,-', 'id': 3}
+    Params = {'name': u'Fred\xf6 has \u20ac 200,-', 'id': 3}
 
     cursor = self.conn.makecursor (cmd, params)
 

Modified: trunk/gnue-common/tests/drivers/drivers.gsd
===================================================================
--- trunk/gnue-common/tests/drivers/drivers.gsd	2007-11-22 15:53:09 UTC (rev 9830)
+++ trunk/gnue-common/tests/drivers/drivers.gsd	2007-11-27 08:18:42 UTC (rev 9831)
@@ -16,6 +16,38 @@
         <pkfield name="id" />
       </primarykey>
     </table>
+
+    <table name="ksample">
+      <fields>
+        <field name="id" type="number" length="8" nullable="False"
+               defaultwith="serial" />
+        <field name="name" type="string" length="30" />
+      </fields>
+
+      <primarykey name="pk_ksample">
+        <pkfield name="id" />
+      </primarykey>
+    </table>
+
+    <table name="kdetail">
+      <fields>
+        <field name="id" type="number" length="8" nullable="False"
+          defaultwith="serial" />
+        <field name="parent" type="number" length="8" nullable="False" />
+        <field name="name" type="string" length="30" />
+      </fields>
+
+      <primarykey name="pk_kdetail">
+        <pkfield name="id" />
+      </primarykey>
+
+      <constraints>
+        <foreignkey name="fk_detail_has_master" references="ksample">
+          <fkfield name="parent" references="id" />
+        </foreignkey>
+      </constraints>
+    </table>
+
   </tables>
 
   <data>

Modified: trunk/gnue-common/tests/drivers/drvcheck.gfd
===================================================================
--- trunk/gnue-common/tests/drivers/drvcheck.gfd	2007-11-22 15:53:09 UTC (rev 9830)
+++ trunk/gnue-common/tests/drivers/drvcheck.gfd	2007-11-27 08:18:42 UTC (rev 9831)
@@ -7,8 +7,16 @@
     <description>Testform for database driver checks</description>
   </options>
 
-  <datasource name="dtsCheck" connection="gnue" table="drvCheck"
-    prequery="Y" order_by="id"/>
+  <datasource name="dtsCheck" connection="fire" table="drvCheck"
+    prequery="Y" order_by="id">
+    <!--
+    <condition>
+      <notfalse>
+        <cfield name="aflag" />
+      </notfalse>
+    </condition>
+    -->
+  </datasource>
 
   <logic>
     <block name="blkCheck" datasource="dtsCheck" >
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.