@mock.patch("h.nipsa.models.NipsaUser")
def test_remove_nipsa_schedules_task_when_user_does_not_exist(NipsaUser, worker):
    NipsaUser.get_by_userid.return_value = None
    request = mock.Mock()

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

    worker.remove_nipsa.delay.assert_called_once_with("test_id")
Even if the user is not NIPSA'd, remove_nipsa() should still schedule a
dataset/ETHPy150Open hypothesis/h/h/nipsa/test/logic_test.py/test_remove_nipsa_schedules_task_when_user_does_not_exist