emmental/db/test_sql.py
Anna Schumaker 9cf1df7c33 db: Move SQLite Connection stuff into a new file
I find this cleaner than importing from the toplevel module

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-10-07 13:58:09 -04:00

15 lines
491 B
Python

# Copyright 2021 (c) Anna Schumaker.
import lib
import sqlite3
import unittest
from . import sql
class TestSQL(unittest.TestCase):
def test_init(self):
self.assertEqual(sql.File, lib.data.emmental_data / "emmental.sqlite")
self.assertIsInstance(sql.Connection, sqlite3.Connection)
self.assertEqual(sql.Connection.row_factory, sqlite3.Row)
self.assertEqual(sql.commit, sql.Connection.commit)
self.assertEqual(sql.execute, sql.Connection.execute)