Пример #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"))
Пример #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'))
Пример #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'))