Пример #1
0
def test_content_id():
    with patch.object(Zenodo, "_urlopen") as fake_urlopen:
        fake_urlopen.return_value.url = "https://zenodo.org/record/3232985"
        zen = Zenodo()

        zen.detect("10.5281/zenodo.3232985")
        assert zen.content_id == "3232985"
def test_content_id(requests_mock):
    requests_mock.get(re.compile("https://"), json=doi_resolver)

    zen = Zenodo()
    zen.detect("10.5281/zenodo.3232985")
    assert zen.content_id == "3232985"