Ejemplo n.º 1
0
 def test_del_export(self):
     '''
     Test for Remove an export
     '''
     with patch.object(nfs3,
                       'list_exports',
                       return_value={'A':
                                     [{'hosts':
                                       ['B1'], 'options': ['23']}]}):
         with patch.object(nfs3, '_write_exports', return_value=None):
             self.assertDictEqual(nfs3.del_export(path='A'), {})
Ejemplo n.º 2
0
 def test_del_export(self):
     '''
     Test for Remove an export
     '''
     with patch.object(nfs3,
                       'list_exports',
                       return_value={'A':
                                     [{'hosts':
                                       ['B1'], 'options': ['23']}]}):
         with patch.object(nfs3, '_write_exports', return_value=None):
             self.assertDictEqual(nfs3.del_export(path='A'), {})
Ejemplo n.º 3
0
 def test_del_export(self):
     """
     Test for Remove an export
     """
     list_exports_mock = MagicMock(
         return_value={"A": [{"hosts": ["B1"], "options": ["23"]}]}
     )
     with patch.object(nfs3, "list_exports", list_exports_mock), patch.object(
         nfs3, "_write_exports", MagicMock(return_value=None)
     ):
         result = nfs3.del_export(path="A")
         assert result == {}, result
Ejemplo n.º 4
0
 def test_del_export(self):
     '''
     Test for Remove an export
     '''
     list_exports_mock = MagicMock(return_value={
         'A': [
             {'hosts': ['B1'],
              'options': ['23']},
         ],
     })
     with patch.object(nfs3, 'list_exports', list_exports_mock), \
             patch.object(nfs3, '_write_exports', MagicMock(return_value=None)):
         result = nfs3.del_export(path='A')
         assert result == {}, result