Fix common.user test

The username was being cached from previous tests, so clear it before
running this test.
This commit is contained in:
Kenny Root 2014-01-10 14:13:25 -08:00
parent 1587f262de
commit 54e7fe91ba
1 changed files with 1 additions and 0 deletions

View File

@ -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):