def test_22__run_banner(self, mock_base, mock_msg):
     """Test22 ExecutionEngineCommon()._run_banner()."""
     mock_base.return_value = "ls"
     ex_eng = ExecutionEngineCommon(self.local, self.xmode)
     ex_eng._run_banner("/bin/bash")
     ex_eng.container_id = "CONTAINERID"
     self.assertTrue(mock_msg.called)
     self.assertTrue(mock_base.called_once_with("/bin/bash"))
 def test_25__run_env_set(self, mock_hiuname):
     """Test25 ExecutionEngineCommon()._run_env_set()."""
     mock_hiuname.return_value = "user1"
     ex_eng = ExecutionEngineCommon(self.local, self.xmode)
     ex_eng.opt["home"] = "/"
     ex_eng.opt["user"] = "******"
     ex_eng.opt["uid"] = "1000"
     ex_eng.container_root = "/croot"
     ex_eng.container_id = "2717add4-e6f6-397c-9019-74fa67be439f"
     ex_eng.container_names = ['cna[]me', ]
     self.xmode.get_mode.return_value = "P1"
     ex_eng._run_env_set()
     self.assertEqual(ex_eng.opt["env"].env["USER"], "user1")
     self.assertEqual(ex_eng.opt["env"].env["LOGNAME"], "user1")
     self.assertEqual(ex_eng.opt["env"].env["USERNAME"], "user1")
     self.assertEqual(ex_eng.opt["env"].env["SHLVL"], "0")