refactor: get rid of secp lib (#40)
This commit is contained in:
parent
35584a230f
commit
a53d2d7767
4 changed files with 14 additions and 14 deletions
|
|
@ -27,13 +27,18 @@ def event_loop():
|
|||
|
||||
@pytest_asyncio.fixture(scope="session", autouse=True)
|
||||
async def migrate_db():
|
||||
print("#### 999")
|
||||
db = Database("ext_nostrrelay")
|
||||
await db.execute("DROP TABLE IF EXISTS nostrrelay.events;")
|
||||
await db.execute("DROP TABLE IF EXISTS nostrrelay.relays;")
|
||||
await db.execute("DROP TABLE IF EXISTS nostrrelay.event_tags;")
|
||||
await db.execute("DROP TABLE IF EXISTS nostrrelay.accounts;")
|
||||
|
||||
# check if exists else skip migrations
|
||||
for key, migrate in inspect.getmembers(migrations, inspect.isfunction):
|
||||
print("### 1000")
|
||||
logger.info(f"Running migration '{key}'.")
|
||||
await migrate(db)
|
||||
return db
|
||||
|
||||
yield db
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ def test_valid_event_id_and_signature(valid_events: list[EventFixture]):
|
|||
try:
|
||||
f.data.check_signature()
|
||||
except Exception as e:
|
||||
logger.error(f"Invalid 'id' ot 'signature' for fixture: '{f.name}'")
|
||||
logger.error(f"Invalid 'id' of 'signature' for fixture: '{f.name}'")
|
||||
raise e
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue