33 lines
525 B
Python
33 lines
525 B
Python
|
#
|
||
|
# $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()
|