示例#1
0
 def testGitIsNotInstalled(self):
     with mock.patch.object(packaging,
                            '_run_shell_command') as _command:
         _command.side_effect = OSError
         self.assertEqual(False, packaging._git_is_installed())
示例#2
0
 def testGitIsNotInstalled(self):
     with mock.patch.object(packaging,
                            '_run_shell_command') as _command:
         _command.side_effect = OSError
         self.assertEqual(False, packaging._git_is_installed())
示例#3
0
 def testGitIsInstalled(self):
     with mock.patch.object(packaging,
                            '_run_shell_command') as _command:
         _command.return_value = 'git version 1.8.4.1'
         self.assertEqual(True, packaging._git_is_installed())
示例#4
0
 def testGitIsInstalled(self):
     with mock.patch.object(packaging,
                            '_run_shell_command') as _command:
         _command.return_value = 'git version 1.8.4.1'
         self.assertEqual(True, packaging._git_is_installed())