test: restructure tests (#2444)
unit, api, wallets * only run test-api for migration
This commit is contained in:
parent
67fdb77339
commit
e607ab7a3e
21 changed files with 605 additions and 563 deletions
21
tests/unit/test_helpers_query.py
Normal file
21
tests/unit/test_helpers_query.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import pytest
|
||||
|
||||
from lnbits.helpers import (
|
||||
insert_query,
|
||||
update_query,
|
||||
)
|
||||
from tests.helpers import DbTestModel
|
||||
|
||||
test = DbTestModel(id=1, name="test", value="yes")
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_helpers_insert_query():
|
||||
q = insert_query("test_helpers_query", test)
|
||||
assert q == "INSERT INTO test_helpers_query (id, name, value) VALUES (?, ?, ?)"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_helpers_update_query():
|
||||
q = update_query("test_helpers_query", test)
|
||||
assert q == "UPDATE test_helpers_query SET id = ?, name = ?, value = ? WHERE id = ?"
|
||||
Loading…
Add table
Add a link
Reference in a new issue