draft tinydb persistence
This commit is contained in:
parent
b258194d6f
commit
aa122f3138
6 changed files with 64 additions and 7 deletions
20
tests/test_persistence.py
Normal file
20
tests/test_persistence.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: UTF-8 -*-
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def persistence():
|
||||
from stacosys.conf import config
|
||||
|
||||
config.params = {"main.db_file": None}
|
||||
from stacosys.core import persistence
|
||||
|
||||
return persistence.Persistence()
|
||||
|
||||
|
||||
def test_init_persistence(persistence):
|
||||
assert persistence is not None
|
||||
assert persistence.get_db() is not None
|
||||
assert persistence.get_table_comments() is not None
|
||||
|
|
@ -2,4 +2,4 @@ from stacosys import __version__
|
|||
|
||||
|
||||
def test_version():
|
||||
assert __version__ == '0.1.0'
|
||||
assert __version__ == '1.1.0'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue