Example #1
0
 def test_apply_network_settings(self):
     '''
     Test if it apply global network configuration.
     '''
     mock = MagicMock(return_value=True)
     with patch.dict(debian_ip.__salt__, {'network.mod_hostname': mock,
                                          'service.stop': mock,
                                          'service.start': mock}):
         self.assertEqual(debian_ip.apply_network_settings(), True)
Example #2
0
 def test_apply_network_settings(self):
     '''
     Test if it apply global network configuration.
     '''
     mock = MagicMock(return_value=True)
     with patch.dict(debian_ip.__salt__, {'network.mod_hostname': mock,
                                          'service.stop': mock,
                                          'service.start': mock}):
         self.assertEqual(debian_ip.apply_network_settings(), True)
 def test_apply_network_settings(self):
     """
     Test if it apply global network configuration.
     """
     mock = MagicMock(return_value=True)
     with patch.dict(
             debian_ip.__salt__,
         {
             "network.mod_hostname": mock,
             "service.stop": mock,
             "service.start": mock
         },
     ):
         self.assertEqual(debian_ip.apply_network_settings(), True)