Skip to content

Commit ceb3cec

Browse files
committed
Use tmp_path for jwt test keys
1 parent 095eb70 commit ceb3cec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_myplex.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,14 +368,14 @@ def test_myplex_ping(account):
368368
assert account.ping()
369369

370370

371-
def test_myplex_jwt_login(account):
371+
def test_myplex_jwt_login(account, tmp_path):
372372
jwtlogin = MyPlexJWTLogin(
373373
token=account.authToken,
374374
scopes=['username', 'email', 'friendly_name']
375375
)
376-
jwtlogin.generateKeypair(keyfiles=('private.key', 'public.key'), overwrite=True)
376+
jwtlogin.generateKeypair(keyfiles=(tmp_path / 'private.key', tmp_path / 'public.key'), overwrite=True)
377377
with pytest.raises(FileExistsError):
378-
jwtlogin.generateKeypair(keyfiles=('private.key', 'public.key'))
378+
jwtlogin.generateKeypair(keyfiles=(tmp_path / 'private.key', tmp_path / 'public.key'))
379379
jwtlogin.registerDevice()
380380
jwtToken = jwtlogin.refreshJWT()
381381
assert jwtlogin.decodePlexJWT()

0 commit comments

Comments
 (0)