Skip to content

Commit

Permalink
Verify MockVCS.delete calls os.remove, to allow Document.delete to de…
Browse files Browse the repository at this point in the history
…lete files
  • Loading branch information
michaelnt committed Feb 26, 2017
1 parent b6cf533 commit b413f27
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doorstop/core/vcs/test/test_commands.py
Expand Up @@ -102,11 +102,13 @@ def test_add(self, mock_call):
calls = []
mock_call.assert_has_calls(calls)

def test_delete(self, mock_call):
"""Verify the placeholder VCS does not delete files."""
@patch('os.remove')
def test_delete(self, mock_remove, mock_call):
"""Verify the placeholder VCS deletes files, as required by document.delete."""
self.delete()
calls = []
mock_call.assert_has_calls(calls)
mock_remove.assert_called_once_with(self.path)

def test_commit(self, mock_call):
"""Verify the placeholder VCS does not commit files."""
Expand Down

0 comments on commit b413f27

Please sign in to comment.