chore: 迁移服务器前同步本地修改
This commit is contained in:
@@ -85,7 +85,7 @@ def test_update_none_affinity_ok():
|
||||
@pytest.mark.asyncio
|
||||
async def test_list_templates(app, fake_actors):
|
||||
pg = types.SimpleNamespace(
|
||||
list_templates=types.SimpleNamespace(remote=AsyncMock(return_value=[]))
|
||||
list_templates=AsyncMock(return_value=[])
|
||||
)
|
||||
fake_actors.register("postgres_database", pg)
|
||||
async with AsyncClient(transport=ASGITransport(app=app), base_url="http://t") as c:
|
||||
@@ -98,7 +98,7 @@ async def test_list_templates(app, fake_actors):
|
||||
async def test_create_template(app, fake_actors):
|
||||
tpl = _tpl()
|
||||
pg = types.SimpleNamespace(
|
||||
add_template=types.SimpleNamespace(remote=AsyncMock(return_value=tpl))
|
||||
add_template=AsyncMock(return_value=tpl)
|
||||
)
|
||||
fake_actors.register("postgres_database", pg)
|
||||
async with AsyncClient(transport=ASGITransport(app=app), base_url="http://t") as c:
|
||||
@@ -110,7 +110,7 @@ async def test_create_template(app, fake_actors):
|
||||
@pytest.mark.asyncio
|
||||
async def test_delete_template_not_found(app, fake_actors):
|
||||
pg = types.SimpleNamespace(
|
||||
get_template=types.SimpleNamespace(remote=AsyncMock(return_value=None))
|
||||
get_template=AsyncMock(return_value=None)
|
||||
)
|
||||
fake_actors.register("postgres_database", pg)
|
||||
async with AsyncClient(transport=ASGITransport(app=app), base_url="http://t") as c:
|
||||
@@ -121,7 +121,7 @@ async def test_delete_template_not_found(app, fake_actors):
|
||||
@pytest.mark.asyncio
|
||||
async def test_delete_other_users_template_forbidden(app, fake_actors):
|
||||
pg = types.SimpleNamespace(
|
||||
get_template=types.SimpleNamespace(remote=AsyncMock(return_value=_tpl(owner="bob")))
|
||||
get_template=AsyncMock(return_value=_tpl(owner="bob"))
|
||||
)
|
||||
fake_actors.register("postgres_database", pg)
|
||||
async with AsyncClient(transport=ASGITransport(app=app), base_url="http://t") as c:
|
||||
|
||||
Reference in New Issue
Block a user