From 54e7fe91ba569fd3bee00364a7310417334e8f79 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Fri, 10 Jan 2014 14:13:25 -0800 Subject: [PATCH] Fix common.user test The username was being cached from previous tests, so clear it before running this test. --- tests/test_segments.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_segments.py b/tests/test_segments.py index d74125b9..fea6e55d 100644 --- a/tests/test_segments.py +++ b/tests/test_segments.py @@ -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):