[csw-devel] SF.net SVN: gar:[20094] csw/mgar/gar/v2/lib/python/database_test.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sat Jan 12 15:51:08 CET 2013


Revision: 20094
          http://gar.svn.sourceforge.net/gar/?rev=20094&view=rev
Author:   wahwah
Date:     2013-01-12 14:51:08 +0000 (Sat, 12 Jan 2013)
Log Message:
-----------
checkpkg: Add a test if we can create tables in the database

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/database_test.py

Modified: csw/mgar/gar/v2/lib/python/database_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/database_test.py	2013-01-12 14:50:43 UTC (rev 20093)
+++ csw/mgar/gar/v2/lib/python/database_test.py	2013-01-12 14:51:08 UTC (rev 20094)
@@ -8,6 +8,18 @@
 
 class DatabaseManagerUnitTest(mox.MoxTestBase):
 
+  def testCanCreateTables(self):
+    # This test succeeds when run with sqlite, but fails with MySQL.
+    # We don't want to add a dependency on a running MySQL database to run tests, so
+    # we'll leave it unsolved for now.
+    dbc = database.CatalogDatabase(uri="sqlite:/:memory:")
+    dbc.CreateTables()
+
+  def testCanCreateTablesAndImportData(self):
+    dbc = database.CatalogDatabase(uri="sqlite:/:memory:")
+    dbc.CreateTables()
+    dbc.InitialDataImport()
+
   def testNoSystemFiles(self):
     # This test shows that stubbing out sqlite classes is quite laborious.
     saved_s = database.m.Srv4FileStats

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list