Added product tests

This commit is contained in:
2024-01-10 23:44:59 +00:00
parent babc1d6471
commit 75e7ad5994
5 changed files with 67 additions and 6 deletions

View File

@@ -17,7 +17,9 @@ class DatabaseController(ABC):
def __init__(self):
self._conn = None
try:
self._conn = sqlite3.connect(self.__sqlitefile)
# Creates a connection and specifies a flag to parse all types back down into
# Python declared types e.g. date & time
self._conn = sqlite3.connect(self.__sqlitefile, detect_types=sqlite3.PARSE_DECLTYPES)
except sqlite3.Error as e:
# Close the connection if still open
if self._conn: