@mock.patch("h.nipsa.models.NipsaUser")
def test_add_nipsa_does_not_add_when_user_already_exists(NipsaUser):
    request = mock.Mock()
    nipsa_user = mock.Mock()
    NipsaUser.get_by_userid.return_value = nipsa_user

    logic.add_nipsa(request=request, userid="test_id")

    assert not request.db.add.called
Yield all item resources in all pages of this resource.
dataset/ETHPy150Open hypothesis/h/h/nipsa/test/logic_test.py/test_add_nipsa_does_not_add_when_user_already_exists--crossover with--dataset/ETHPy150Open reviewboard/rbtools/rbtools/api/resource.py/ListResource.all_items