2020-10-08 16:47:53 +00:00
|
|
|
import unittest
|
|
|
|
|
|
|
|
from kdoorweb.db import DB
|
|
|
|
|
|
|
|
|
|
|
|
class TestDB(unittest.TestCase):
|
2020-10-08 17:43:48 +00:00
|
|
|
def setUp(self) -> None:
|
|
|
|
self.db = DB()
|
|
|
|
|
2020-10-08 16:47:53 +00:00
|
|
|
def test_create_db_in_memory(self):
|
|
|
|
DB.create_db(dbfile=":memory:")
|
|
|
|
|
2020-10-08 17:43:48 +00:00
|
|
|
def test_create_db_in_connection(self):
|
|
|
|
DB.create_db(dbfile=self.db)
|
|
|
|
|
2020-10-08 16:47:53 +00:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main()
|