Projects
/
mdb-ng
Archived
4
0
Fork 0

Basic tests and some framework for db.connect/disconnect.

This commit is contained in:
Øyvind Grønnesby 2005-03-17 21:29:08 +00:00
parent 164c0a877d
commit 4d18c3c29a
2 changed files with 37 additions and 0 deletions

5
test/common.py Normal file
View File

@ -0,0 +1,5 @@
#
# $Id$
#
import sys; sys.path.append("../lib")

32
test/db_test.py Normal file
View File

@ -0,0 +1,32 @@
#
# $Id$
#
import common, unittest
from unittest import TestCase
class mdbTest(TestCase):
def setUp(self):
import mdb
self.mdb = mdb
class connectTest(mdbTest):
def test_1(self):
db = self.mdb.connect("inputs/db-0/")
self.failUnless(db.__class__ == self.mdb.db.PVVDB)
class disconnectTest(mdbTest):
def test_1(self):
db = self.mdb.connect("inputs/db-0/")
self.mdb.disconnect(db)
#
# Run the library tests.
#
if __name__ == '__main__':
unittest.main()