Skip to content

Commit e7b75c6

Browse files
committed
style(test): format test helpers
Signed-off-by: phernandez <paul@basicmachines.co>
1 parent 1bd1aad commit e7b75c6

3 files changed

Lines changed: 7 additions & 15 deletions

File tree

test-int/conftest.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,7 @@ async def _reset_postgres_integration_schema(engine) -> None:
178178
await conn.execute(text(f"DROP TABLE IF EXISTS {table_name} CASCADE"))
179179

180180
await conn.execute(
181-
text(
182-
f"TRUNCATE TABLE {', '.join(_postgres_reset_tables())} "
183-
"RESTART IDENTITY CASCADE"
184-
)
181+
text(f"TRUNCATE TABLE {', '.join(_postgres_reset_tables())} RESTART IDENTITY CASCADE")
185182
)
186183

187184

tests/api/v2/test_knowledge_router_telemetry.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ async def test_create_entity_emits_root_and_nested_spans(monkeypatch) -> None:
5959
monkeypatch.setattr(knowledge_router_module.telemetry, "span", fake_span)
6060

6161
entity = _fake_entity()
62-
response_content = "---\ntitle: Telemetry Entity\ntype: note\npermalink: notes/test\n---\n\ntelemetry content"
62+
response_content = (
63+
"---\ntitle: Telemetry Entity\ntype: note\npermalink: notes/test\n---\n\ntelemetry content"
64+
)
6365

6466
class FakeEntityService:
6567
async def create_entity_with_content(self, data):
@@ -119,9 +121,7 @@ async def test_update_entity_emits_root_and_nested_spans(monkeypatch) -> None:
119121
monkeypatch.setattr(knowledge_router_module.telemetry, "span", fake_span)
120122

121123
entity = _fake_entity()
122-
response_content = (
123-
"---\ntitle: Telemetry Entity\ntype: note\npermalink: notes/test\n---\n\nupdated telemetry content"
124-
)
124+
response_content = "---\ntitle: Telemetry Entity\ntype: note\npermalink: notes/test\n---\n\nupdated telemetry content"
125125

126126
class FakeEntityService:
127127
async def update_entity_with_content(self, existing, data):
@@ -190,9 +190,7 @@ async def test_edit_entity_emits_root_and_nested_spans(monkeypatch) -> None:
190190
monkeypatch.setattr(knowledge_router_module.telemetry, "span", fake_span)
191191

192192
entity = _fake_entity()
193-
response_content = (
194-
"---\ntitle: Telemetry Entity\ntype: note\npermalink: notes/test\n---\n\nedited telemetry content"
195-
)
193+
response_content = "---\ntitle: Telemetry Entity\ntype: note\npermalink: notes/test\n---\n\nedited telemetry content"
196194

197195
class FakeEntityService:
198196
async def edit_entity_with_content(self, **kwargs):

tests/conftest.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,7 @@ async def _reset_postgres_test_schema(engine: AsyncEngine, async_url: str) -> No
172172
await conn.execute(text(f"DROP TABLE IF EXISTS {table_name} CASCADE"))
173173

174174
await conn.execute(
175-
text(
176-
f"TRUNCATE TABLE {', '.join(_postgres_reset_tables())} "
177-
"RESTART IDENTITY CASCADE"
178-
)
175+
text(f"TRUNCATE TABLE {', '.join(_postgres_reset_tables())} RESTART IDENTITY CASCADE")
179176
)
180177

181178
alembic_version_exists = (

0 commit comments

Comments
 (0)