def test_commit_no_commit(self, workspace): config = Config({'file': 'fake.py', 'vcs': 'fake', 'commit': False}) releaser = Releaser(config) with patch.object(releaser, 'vcs') as vcs: releaser.commit('message') assert not vcs.commit.called
def test_commit(self, workspace): config = Config({'file': 'fake.py', 'vcs': 'fake'}) releaser = Releaser(config) with patch.object(releaser, 'vcs') as vcs: releaser.commit('message') vcs.commit.assert_called_with('message')
def test_commit_no_commit(workspace, mocker): config = Config({'file': 'fake.py', 'vcs': 'fake', 'commit': False}) releaser = Releaser(config) vcs = mocker.patch.object(releaser, 'vcs') releaser.commit('message') assert not vcs.commit.called
def test_commit(workspace, mocker): config = Config({'file': 'fake.py', 'vcs': 'fake'}) releaser = Releaser(config) vcs = mocker.patch.object(releaser, 'vcs') releaser.commit('message') vcs.commit.assert_called_with('message')
def test_commit(self): config = Config({'file': 'fake.py', 'vcs': 'fake'}) with workspace('fake') as wksp: releaser = Releaser(config) with patch.object(releaser, 'vcs') as vcs: releaser.commit('message') vcs.commit.assert_called_with('message')
def test_commit_no_commit(workspace, mocker): config = Config({"file": "fake.py", "vcs": "fake", "commit": False}) releaser = Releaser(config) vcs = mocker.patch.object(releaser, "vcs") releaser.commit("message") assert not vcs.commit.called
def test_commit(workspace, mocker): config = Config({"file": "fake.py", "vcs": "fake"}) releaser = Releaser(config) vcs = mocker.patch.object(releaser, "vcs") releaser.commit("message") vcs.commit.assert_called_with("message")