Simone Robutti ddc706e201
Add publication crud (#178)
* fixed parsing bug

* implemented events and publications endpoints

split endpoints by entity

removed credentials

* add pagination (#179)

* added pagination

* integrated pagination with tortoise

* added test for publications

* removed converter file

* updated dependencies
2022-12-07 21:46:57 +01:00

28 lines
595 B
Python

import pytest
import urllib3
from httpx import AsyncClient
from mobilizon_reshare.storage import db
from mobilizon_reshare.web.backend.main import app, init_endpoints
@pytest.fixture(scope="session")
def anyio_backend():
return "asyncio"
@pytest.fixture()
async def client():
init_endpoints(app)
async with AsyncClient(app=app, base_url="http://test") as client:
yield client
@pytest.fixture(autouse=True)
def mock_sqlite_db(monkeypatch):
def get_url():
return urllib3.util.parse_url("sqlite://memory")
monkeypatch.setattr(db, "get_db_url", get_url)