Ejemplo n.º 1
0
 def test_set_(self):
     """
     Test for Set answers to debconf questions for a package.
     """
     mock = MagicMock(return_value=None)
     with patch.object(os, "write", mock):
         with patch.object(os, "close", mock):
             with patch.object(debconfmod, "_set_file", mock):
                 with patch.object(os, "unlink", mock):
                     self.assertTrue(
                         debconfmod.set_("package", "question", "type",
                                         "value"))
Ejemplo n.º 2
0
 def test_set_(self):
     '''
     Test for Set answers to debconf questions for a package.
     '''
     mock = MagicMock(return_value=None)
     with patch.object(os, 'write', mock):
         with patch.object(os, 'close', mock):
             with patch.object(debconfmod, '_set_file', mock):
                 with patch.object(os, 'unlink', mock):
                     self.assertTrue(debconfmod.set_('package',
                                                     'question',
                                                     'type', 'value'))
Ejemplo n.º 3
0
 def test_set_(self):
     '''
     Test for Set answers to debconf questions for a package.
     '''
     mock = MagicMock(return_value=None)
     with patch.object(os, 'write', mock):
         with patch.object(os, 'close', mock):
             with patch.object(debconfmod, '_set_file', mock):
                 with patch.object(os, 'unlink', mock):
                     self.assertTrue(
                         debconfmod.set_('package', 'question', 'type',
                                         'value'))