File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 1+ import os
2+
3+ import pytest
4+
5+ from vault_cli import settings
6+
7+
8+ @pytest .fixture (autouse = True )
9+ def isolate_tests ():
10+
11+ for key in os .environ :
12+ if key .startswith (settings .ENV_PREFIX ):
13+ os .environ .pop (key )
Original file line number Diff line number Diff line change @@ -101,15 +101,9 @@ def test_integration_lib(clean_vault):
101101 assert client .lookup_token ()["data" ]
102102
103103
104- @pytest .fixture
105- def environ ():
106- yield os .environ
107- os .environ .pop ("VAULT_CLI_TOKEN" )
108-
109-
110- def test_env_var_config (environ ):
104+ def test_env_var_config ():
111105 # Test env var config
112- environ ["VAULT_CLI_TOKEN" ] = "some-other-token"
106+ os . environ ["VAULT_CLI_TOKEN" ] = "some-other-token"
113107 with pytest .raises (vault_cli .VaultAPIException ):
114108 vault_cli .get_client ().set_secret ("a" , "b" )
115109
You can’t perform that action at this time.
0 commit comments