def test_push(self): git = Git() with patch.object(git, 'execute') as execute: git.push() execute.assert_any_call(['git', 'push']) execute.assert_any_call(['git', 'push', '--tags'])
def test_push(self, mocker): git = Git() execute = mocker.patch.object(git, 'execute') git.push() execute.assert_any_call(['git', 'push']) execute.assert_any_call(['git', 'push', '--tags'])
def test_push(self, mocker): git = Git() execute = mocker.patch.object(git, "execute") git.push() execute.assert_any_call(["git", "push"]) execute.assert_any_call(["git", "push", "--tags"])