Exemple #1
0
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]")
Exemple #2
0
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]")
Exemple #3
0
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]")
Exemple #4
0
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]")
Exemple #5
0
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"
Exemple #6
0
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"
Exemple #7
0
def test_nipsa_remove_redirects_to_index():
    request = DummyRequest(params={"remove": "kiki"})

    response = admin.nipsa_remove(request)

    assert isinstance(response, httpexceptions.HTTPSeeOther)
Exemple #8
0
def test_nipsa_remove_redirects_to_index():
    request = DummyRequest(params={"remove": "kiki"})

    response = admin.nipsa_remove(request)

    assert isinstance(response, httpexceptions.HTTPSeeOther)