def test_aaaa(self): dig_mock = MagicMock( return_value={ "pid": 25451, "retcode": 0, "stderr": "", "stdout": "2607:f8b0:400f:801::1014", } ) with patch.dict(dig.__salt__, {"cmd.run_all": dig_mock}): self.assertEqual(dig.AAAA("www.google.com"), ["2607:f8b0:400f:801::1014"])
def test_aaaa(self): dig_mock = MagicMock( return_value={ 'pid': 25451, 'retcode': 0, 'stderr': '', 'stdout': '2607:f8b0:400f:801::1014' }) with patch.dict(dig.__salt__, {'cmd.run_all': dig_mock}): self.assertEqual(dig.AAAA('www.google.com'), ['2607:f8b0:400f:801::1014'])