Example #1
0
 def test_whoami_uses_logname_if_user_not_set_different_logname(self):
     env = {"LOGNAME": "pl"}
     with patch("os.environ", env):
         self.assertEqual(utils.whoami(), "pl")
Example #2
0
 def test_whoami_user_kb(self):
     env = {"USER": "******"}
     with patch("os.environ", env):
         self.assertEqual(utils.whoami(), "kb")