Fix common.user test
The username was being cached from previous tests, so clear it before running this test.
This commit is contained in:
parent
1587f262de
commit
54e7fe91ba
|
@ -73,6 +73,7 @@ class TestCommon(TestCase):
|
|||
new_psutil = new_module('psutil', Process=lambda pid: Args(username='def'))
|
||||
pl = Pl()
|
||||
with replace_env('USER', 'def') as segment_info:
|
||||
common.username = False
|
||||
with replace_attr(common, 'os', new_os):
|
||||
with replace_attr(common, 'psutil', new_psutil):
|
||||
with replace_attr(common, '_geteuid', lambda: 5):
|
||||
|
|
Loading…
Reference in New Issue