Skip to content

Commit 5905218

Browse files
committed
ruff
1 parent 5f70d28 commit 5905218

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

service_template/tests/test_postgres.py

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,45 @@
77

88

99
async def test_basic(service_client):
10-
response = await service_client.post('/hello-postgres', params={'name': 'Tester'})
10+
response = await service_client.post(
11+
"/hello-postgres",
12+
params={"name": "Tester"},
13+
)
1114
assert response.status == 200
12-
assert response.text == 'Hello, Tester!\n'
15+
assert response.text == "Hello, Tester!\n"
1316

1417

1518
async def test_db_updates(service_client):
16-
response = await service_client.post('/hello-postgres', params={'name': 'World'})
19+
response = await service_client.post(
20+
"/hello-postgres",
21+
params={"name": "World"},
22+
)
1723
assert response.status == 200
18-
assert response.text == 'Hello, World!\n'
24+
assert response.text == "Hello, World!\n"
1925

20-
response = await service_client.post('/hello-postgres', params={'name': 'World'})
26+
response = await service_client.post(
27+
"/hello-postgres",
28+
params={"name": "World"},
29+
)
2130
assert response.status == 200
22-
assert response.text == 'Hi again, World!\n'
31+
assert response.text == "Hi again, World!\n"
2332

24-
response = await service_client.post('/hello-postgres', params={'name': 'World'})
33+
response = await service_client.post(
34+
"/hello-postgres",
35+
params={"name": "World"},
36+
)
2537
assert response.status == 200
26-
assert response.text == 'Hi again, World!\n'
38+
assert response.text == "Hi again, World!\n"
2739

2840

29-
@pytest.mark.pgsql('db_1', files=['initial_data.sql'])
41+
@pytest.mark.pgsql("db_1", files=["initial_data.sql"])
3042
async def test_db_initial_data(service_client):
3143
response = await service_client.post(
32-
'/hello-postgres',
33-
params={'name': 'user-from-initial_data.sql'},
44+
"/hello-postgres",
45+
params={"name": "user-from-initial_data.sql"},
3446
)
3547
assert response.status == 200
36-
assert response.text == 'Hi again, user-from-initial_data.sql!\n'
48+
assert response.text == "Hi again, user-from-initial_data.sql!\n"
3749

3850

3951
# postgres template on

0 commit comments

Comments
 (0)