示例#1
0
def test_remove_failed(web_client: WebClient, package_ahriman: Package,
                       mocker: MockerFixture) -> None:
    """
    must suppress any exception happened during removal
    """
    mocker.patch("requests.delete", side_effect=Exception())
    web_client.remove(package_ahriman.base)
示例#2
0
def test_remove(web_client: WebClient, package_ahriman: Package,
                mocker: MockerFixture) -> None:
    """
    must process package removal
    """
    requests_mock = mocker.patch("requests.delete")

    web_client.remove(package_ahriman.base)
    requests_mock.assert_called_with(pytest.helpers.anyvar(str, True))