Skip to content

Commit 3765f04

Browse files
pre-commit-ci[bot]danielhanchen
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent d404cad commit 3765f04

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

studio/backend/tests/test_desktop_auth.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,13 @@ def test_bootstrap_password_round_trips_across_a_restart_with_the_newline():
153153
assert storage.generate_bootstrap_password() == original
154154

155155

156-
@pytest.mark.parametrize("legacy", [
157-
b"legacy-bootstrap-secret", # written before the newline existed
158-
b"legacy-bootstrap-secret\r\n", # written by text mode on Windows
159-
])
156+
@pytest.mark.parametrize(
157+
"legacy",
158+
[
159+
b"legacy-bootstrap-secret", # written before the newline existed
160+
b"legacy-bootstrap-secret\r\n", # written by text mode on Windows
161+
],
162+
)
160163
def test_upgrade_normalises_the_bootstrap_file(legacy):
161164
# The upgrade path is ensure_default_admin() on an install that already has
162165
# the admin row, which never reaches generate_bootstrap_password().
@@ -213,8 +216,11 @@ def boom(src, dst):
213216
storage._persist_bootstrap_password("new-secret")
214217

215218
assert storage._BOOTSTRAP_PW_PATH.read_bytes() == b"original-secret\n"
216-
leftovers = [p.name for p in storage._BOOTSTRAP_PW_PATH.parent.iterdir()
217-
if "bootstrap_password." in p.name]
219+
leftovers = [
220+
p.name
221+
for p in storage._BOOTSTRAP_PW_PATH.parent.iterdir()
222+
if "bootstrap_password." in p.name
223+
]
218224
assert leftovers == []
219225

220226

0 commit comments

Comments
 (0)