File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 7
7
@mock .patch .dict (os .environ )
8
8
def test_create_environment_dict ():
9
9
base = {'FOO' : 'bar' , 'BAZ' : 'foobar' }
10
- os .environ = base
10
+ os .environ = base # noqa: B003
11
11
assert create_environment_dict ({'FOO' : 'baz' }) == {
12
12
'FOO' : 'baz' , 'BAZ' : 'foobar' ,
13
13
}
Original file line number Diff line number Diff line change @@ -153,7 +153,8 @@ def setUp(self):
153
153
self .os_environ = os .environ .copy ()
154
154
155
155
def tearDown (self ):
156
- os .environ = self .os_environ
156
+ os .environ .clear ()
157
+ os .environ .update (self .os_environ )
157
158
158
159
def test_from_env (self ):
159
160
"""Test that environment variables are passed through to
Original file line number Diff line number Diff line change @@ -59,7 +59,8 @@ def setUp(self):
59
59
self .os_environ = os .environ .copy ()
60
60
61
61
def tearDown (self ):
62
- os .environ = self .os_environ
62
+ os .environ .clear ()
63
+ os .environ .update (self .os_environ )
63
64
64
65
def test_kwargs_from_env_empty (self ):
65
66
os .environ .update (DOCKER_HOST = '' ,
You can’t perform that action at this time.
0 commit comments