summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 705dab6)
raw | patch | inline | side by side (parent: 705dab6)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sun, 2 Nov 2003 08:44:17 +0000 (08:44 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Sun, 2 Nov 2003 08:44:17 +0000 (08:44 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1952 57a73879-2fb5-44c3-a270-3262357dd7e2
test/db_test_base.py | patch | blob | history | |
test/test_mysql.py | patch | blob | history | |
test/test_sqlite.py | patch | blob | history |
diff --git a/test/db_test_base.py b/test/db_test_base.py
index 80285b1b3833a348097de6d695625302c67d6ae5..3b6d35772c067dfe9ed740dd3bcbcdec27ad45de 100644 (file)
--- a/test/db_test_base.py
+++ b/test/db_test_base.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: db_test_base.py,v 1.1 2003-10-25 22:53:26 richard Exp $
+# $Id: db_test_base.py,v 1.2 2003-11-02 08:44:17 richard Exp $
import unittest, os, shutil, errno, imp, sys, time
self.assertEqual(self.db.b.get(bid, 'name'), 'bear')
self.assertEqual(self.db.b.lookup('bear'), bid)
+ # confirm journal's ok
+ self.db.getjournal('a', aid)
+ self.db.getjournal('b', bid)
+
def init_amod(self):
self.db = self.module.Database(config, 'admin')
a = self.module.Class(self.db, "a", name=String(), fooz=String())
self.assertEqual(self.db.a.get(aid2, 'name'), 'aardvark')
self.assertEqual(self.db.a.get(aid2, 'fooz'), 'booz')
+ # confirm journal's ok
+ self.db.getjournal('a', aid)
+ self.db.getjournal('a', aid2)
+
def init_amodkey(self):
self.db = self.module.Database(config, 'admin')
a = self.module.Class(self.db, "a", name=String(), fooz=String())
self.init_amodkey()
self.assertEqual(self.db.a.lookup('booz'), aid2)
+ # confirm journal's ok
+ self.db.getjournal('a', aid)
+
def init_ml(self):
self.db = self.module.Database(config, 'admin')
a = self.module.Class(self.db, "a", name=String())
self.assertEqual(self.db.a.lookup('apple'), aid)
self.assertEqual(self.db.b.lookup('bear'), bid)
+ # confirm journal's ok
+ self.db.getjournal('a', aid)
+ self.db.getjournal('b', bid)
+
def test_removeMultilink(self):
# add a multilink prop
self.init_ml()
self.assertEqual(self.db.a.lookup('apple'), aid)
self.assertEqual(self.db.b.lookup('bear'), bid)
+ # confirm journal's ok
+ self.db.getjournal('a', aid)
+ self.db.getjournal('b', bid)
+
def test_removeClass(self):
self.init_ml()
aid = self.db.a.create(name='apple')
self.assertEqual(self.db.a.get(aid, 'name'), 'apple')
self.assertEqual(self.db.a.lookup('apple'), aid)
+ # confirm journal's ok
+ self.db.getjournal('a', aid)
+ self.db.getjournal('b', bid)
+
class ClassicInitTest(unittest.TestCase):
count = 0
diff --git a/test/test_mysql.py b/test/test_mysql.py
index 2e16e5d71af7f9982bd20525b47dddffd577d103..5825ff3050078e8d926362a89e46d10d926d8cf1 100644 (file)
--- a/test/test_mysql.py
+++ b/test/test_mysql.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: test_mysql.py,v 1.2 2003-10-26 14:13:04 jlgijsbers Exp $
+# $Id: test_mysql.py,v 1.3 2003-11-02 08:44:17 richard Exp $
import unittest, os, shutil, time, imp
l = db.issue.list()
ae(l, [])
- from roundup.backends import mysql as module
+ if hasattr(backends, 'mysql'):
+ from roundup.backends import mysql as module
def tearDown(self):
ClassicInitTest.tearDown(self)
self.module.db_nuke(config)
diff --git a/test/test_sqlite.py b/test/test_sqlite.py
index 8479ef4a9a455ec713782651cd32d1c60107db11..bf0cc2225393c4880a45ee1199593d69388514da 100644 (file)
--- a/test/test_sqlite.py
+++ b/test/test_sqlite.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: test_sqlite.py,v 1.1 2003-10-25 22:53:26 richard Exp $
+# $Id: test_sqlite.py,v 1.2 2003-11-02 08:44:17 richard Exp $
import unittest, os, shutil, time
ClassicInitTest
class sqliteOpener:
- from roundup.backends import sqlite as module
+ from roundup import backends
+ if hasattr(backends, 'sqlite'):
+ from roundup.backends import sqlite as module
class sqliteDBTest(sqliteOpener, DBTest):
pass