コード例 #1
0
 def test_subnets(self):
     '''
     Test if it returns a list of subnets to which the host belongs
     '''
     with patch.object(salt.utils.network, 'subnets',
                       MagicMock(return_value='10.1.1.0/24')):
         self.assertEqual(win_network.subnets(), '10.1.1.0/24')
コード例 #2
0
def test_subnets():
    """
    Test if it returns a list of subnets to which the host belongs
    """
    with patch.object(salt.utils.network, "subnets",
                      MagicMock(return_value="10.1.1.0/24")):
        assert win_network.subnets() == "10.1.1.0/24"
コード例 #3
0
ファイル: win_network_test.py プロジェクト: dmyerscough/salt
 def test_subnets(self):
     '''
     Test if it returns a list of subnets to which the host belongs
     '''
     with patch.object(salt.utils.network, 'subnets',
                       MagicMock(return_value='10.1.1.0/24')):
         self.assertEqual(win_network.subnets(), '10.1.1.0/24')