예제 #1
0
    def test_dirty(self):
        """Test not exists."""
        self.mock.execute.return_value = (0, 'some change')
        self.assertTrue(binary_providers.is_repo_dirty('/dir'))

        self.mock.execute.assert_called_once_with('git',
                                                  'diff',
                                                  '/dir',
                                                  print_command=False,
                                                  print_output=False)
    def test_clean(self):
        """Test exists."""
        self.mock.execute.return_value = (0, '')
        self.assertFalse(binary_providers.is_repo_dirty('/dir'))

        self.mock.execute.assert_called_once_with('git',
                                                  'diff',
                                                  '/dir',
                                                  print_command=True,
                                                  print_output=True)