Dataclasses WIP
This commit is contained in:
21
test/SQL_handler_test.py
Normal file
21
test/SQL_handler_test.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import sys, os
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||
|
||||
from src.core.SQL_handler import SQLite3FileHandler
|
||||
from pathlib import Path
|
||||
|
||||
db_path = Path("Test.db3")
|
||||
|
||||
test = SQLite3FileHandler(db_path=db_path)
|
||||
try:
|
||||
test.insert_tag("test")
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
test.insert_category("Test")
|
||||
except:
|
||||
pass
|
||||
test.insert_relation_tag_cat(4, 7)
|
||||
print(test.fetch_all("RELATIONS"))
|
||||
|
||||
test.close()
|
||||
Reference in New Issue
Block a user