Beispiel #1
0
def test_is_commit_in_version_no(mocker):
    session = mocker.MagicMock()
    session.get.return_value.json.return_value = {"status": "diverged"}

    assert not django.is_commit_in_version("abcdef", "1.9", session)

    assert session.mock_calls[0] == mocker.call.get(
        "https://api.github.com/repos/django/django/"
        "compare/abcdef...1.9")
Beispiel #2
0
def test_is_commit_in_version_yes(mocker):
    assert django.is_commit_in_version("abcdef", "1.9", mocker.MagicMock())