Ejemplo n.º 1
0
 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"])
Ejemplo n.º 2
0
 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'])