Skip to content

Commit a25b388

Browse files
Small users test refactors (#654)
1 parent 268d689 commit a25b388

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

tests/integration/account/test_account.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def test_user_list():
232232

233233

234234
@pytest.fixture
235-
def get_user_id():
235+
def username():
236236
user_id = (
237237
exec_test_command(
238238
[
@@ -255,11 +255,10 @@ def get_user_id():
255255
yield first_id
256256

257257

258-
def test_user_view(get_user_id):
259-
user_id = get_user_id
258+
def test_user_view(username: str):
260259
res = (
261260
exec_test_command(
262-
["linode-cli", "users", "view", user_id, "--text", "--delimiter=,"]
261+
["linode-cli", "users", "view", username, "--text", "--delimiter=,"]
263262
)
264263
.stdout.decode()
265264
.rstrip()

tests/integration/linodes/test_rebuild.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,13 @@ def test_linode_id(linode_cloud_firewall):
2727

2828
@pytest.mark.flaky(reruns=3, reruns_delay=2)
2929
def test_rebuild_fails_without_image(test_linode_id):
30-
linode_id = test_linode_id
31-
3230
result = exec_failing_test_command(
3331
BASE_CMD
3432
+ [
3533
"rebuild",
3634
"--root_pass",
3735
DEFAULT_RANDOM_PASS,
38-
linode_id,
36+
test_linode_id,
3937
"--text",
4038
"--no-headers",
4139
],

0 commit comments

Comments
 (0)