Пример #1
0
 def test_get_saved_rules(self):
     '''
     Test if it return a data structure of the rules in the conf file
     '''
     with patch.dict(nftables.__grains__, {'os_family': 'Debian'}):
         with patch.object(salt.utils, 'fopen', MagicMock(mock_open())):
             self.assertListEqual(nftables.get_saved_rules(), [])
Пример #2
0
 def test_get_saved_rules(self):
     """
     Test if it return a data structure of the rules in the conf file
     """
     with patch.dict(nftables.__grains__, {"os_family": "Debian"}):
         with patch.object(salt.utils.files, "fopen", MagicMock(mock_open())):
             self.assertListEqual(nftables.get_saved_rules(), [])
Пример #3
0
 def test_get_saved_rules(self):
     '''
     Test if it return a data structure of the rules in the conf file
     '''
     with patch.dict(nftables.__grains__, {'os_family': 'Debian'}):
         with patch.object(salt.utils, 'fopen', MagicMock(mock_open())):
             self.assertListEqual(nftables.get_saved_rules(), [])