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)
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))