mirror of
https://github.com/Casvt/MIND.git
synced 2026-04-03 03:00:22 -04:00
Added tests
This commit is contained in:
12
tests/db_test.py
Normal file
12
tests/db_test.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import unittest
|
||||
|
||||
from backend.db import DBConnection
|
||||
from Noted import DB_FILENAME
|
||||
|
||||
class Test_DB(unittest.TestCase):
|
||||
def test_foreign_key(self):
|
||||
DBConnection.file = DB_FILENAME
|
||||
instance = DBConnection(timeout=20.0)
|
||||
self.assertEqual(instance.cursor().execute("PRAGMA foreign_keys;").fetchone()[0], 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user