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")
def test_whoami_user_kb(self): env = {"USER": "******"} with patch("os.environ", env): self.assertEqual(utils.whoami(), "kb")