示例#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
示例#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')
示例#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
示例#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')
示例#5
0
    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')
示例#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
示例#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")