示例#1
0
    def test_push_no_commit(self, workspace):
        config = Config({'file': 'fake.py', 'vcs': 'fake', 'push': True, 'commit': False})
        releaser = Releaser(config)

        with patch.object(releaser, 'vcs') as vcs:
            releaser.push()
            assert not vcs.push.called
示例#2
0
    def test_push_disabled_by_default(self, workspace):
        config = Config({'file': 'fake.py', 'vcs': 'fake'})
        releaser = Releaser(config)

        with patch.object(releaser, 'vcs') as vcs:
            releaser.push()
            assert not vcs.push.called
示例#3
0
def test_push_no_commit(workspace, mocker):
    config = Config({'file': 'fake.py', 'vcs': 'fake', 'push': True, 'commit': False})
    releaser = Releaser(config)
    vcs = mocker.patch.object(releaser, 'vcs')

    releaser.push()

    assert not vcs.push.called
示例#4
0
def test_push_disabled_by_default(workspace, mocker):
    config = Config({'file': 'fake.py', 'vcs': 'fake'})
    releaser = Releaser(config)
    vcs = mocker.patch.object(releaser, 'vcs')

    releaser.push()

    assert not vcs.push.called
示例#5
0
def test_push(workspace, mocker):
    config = Config({"file": "fake.py", "vcs": "fake", "push": True})
    releaser = Releaser(config)
    vcs = mocker.patch.object(releaser, "vcs")

    releaser.push()

    assert vcs.push.called
示例#6
0
def test_push_disabled_by_default(workspace, mocker):
    config = Config({"file": "fake.py", "vcs": "fake"})
    releaser = Releaser(config)
    vcs = mocker.patch.object(releaser, "vcs")

    releaser.push()

    assert not vcs.push.called