def test_nipsa_remove_calls_nipsa_api_with_userid(nipsa): request = Mock(params={"remove": "kiki"}, domain="hypothes.is") admin.nipsa_remove(request) nipsa.remove_nipsa.assert_called_once_with( request, "acct:[email protected]")
def test_nipsa_remove_calls_nipsa_api_with_userid(nipsa): request = DummyRequest(params={"remove": "kiki"}) admin.nipsa_remove(request) nipsa.remove_nipsa.assert_called_once_with( request, "acct:[email protected]")
def test_nipsa_remove_calls_nipsa_api_with_userid(nipsa): request = Mock(params={"remove": "kiki"}, domain="hypothes.is") admin.nipsa_remove(request) nipsa.remove_nipsa.assert_called_once_with(request, "acct:[email protected]")
def test_nipsa_remove_calls_nipsa_api_with_userid(nipsa): request = DummyRequest(params={"remove": "kiki"}) admin.nipsa_remove(request) nipsa.remove_nipsa.assert_called_once_with(request, "acct:[email protected]")
def test_nipsa_remove_redirects_to_index(): request = Mock(params={"remove": "kiki"}, domain="hypothes.is", route_url=Mock(return_value="/nipsa")) response = admin.nipsa_remove(request) assert isinstance(response, httpexceptions.HTTPSeeOther) assert response.location == "/nipsa"
def test_nipsa_remove_redirects_to_index(): request = DummyRequest(params={"remove": "kiki"}) response = admin.nipsa_remove(request) assert isinstance(response, httpexceptions.HTTPSeeOther)