Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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