def test_tag(): mock = MagicMock() with patch("subprocess.call", mock): scm = SourceControl() scm.tag(Version(2, 0, 1)) mock.assert_has_calls([ call(["git.exe", "tag", "-a", "v2.0.1", "-m", "\"Version 2.0.1\""], env=ANY, shell=True) ])
def test_tag(): mock = MagicMock() with patch("subprocess.call", mock): scm = SourceControl() scm.tag(Version(2, 0, 1)) mock.assert_has_calls([call(["git.exe", "tag", "-a", "v2.0.1", "-m", '"Version 2.0.1"'], env=ANY, shell=True)])
def createSCM(): scm = SourceControl() scm.tag = MagicMock() scm.commit = MagicMock() return scm