Beispiel #1
0
    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
Beispiel #2
0
    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')
Beispiel #3
0
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
Beispiel #4
0
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')
Beispiel #6
0
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
Beispiel #7
0
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")