def test_execute_nongating(self, t_run): config = {"host_string": "127.0.0.1", "user": "******"} r1 = Result("result1") r1.return_code = 127 t_run.return_value = r1 res, negative = tunirutils.execute(config, '## ls') self.assertEqual(str(res), "result1") self.assertEqual(negative, "dontcare")
def test_execute_nagative(self, t_run): config = {"host_string": "127.0.0.1", "user": "******"} r1 = Result("result1") r1.return_code = 127 t_run.return_value = r1 res, negative = tunirutils.execute(config, '@@ ls') self.assertEqual(res, "result1") self.assertEqual(negative, "yes")
def test_execute_nongating(self, t_run): config = {"host_string": "127.0.0.1", "user": "******"} r1 = Result("result1") r1.return_code = 127 t_run.return_value=r1 res, negative = tunirutils.execute(config, '## ls') self.assertEqual(res, "result1") self.assertEqual(negative, "dontcare")