def METHOD_NAME(
    self, client, factory, namespace, view_name, group_attr
):
    o = factory()
    group = getattr(o, group_attr)
    admin = UserFactory()
    u = UserFactory()
    assert not group.user_set.filter(pk=u.pk).exists()
    def get_user_autocomplete():
        return get_view_for_user(
            client=client,
            viewname="users-autocomplete",
            user=admin,
            data={"q": u.username.lower()},
        )
    o.add_editor(admin)
    response = get_user_autocomplete()
    assert response.status_code == 200
    assert str(u.pk) in response.json()["results"][0]["id"]
    assert (
        html_escape(str(u.user_profile.get_mugshot_url()))
        in response.json()["results"][0]["text"]
    )
    assert u.username in response.json()["results"][0]["text"]
    assert u.get_full_name() in response.json()["results"][0]["text"]
    response = get_view_for_user(
        client=client,
        viewname=f"{namespace}:{view_name}-update",
        reverse_kwargs={"slug": o.slug},
        user=admin,
        method=client.post,
        data={"action": "ADD", "user": u.pk},
    )
    assert response.status_code == 302
    assert group.user_set.filter(pk=u.pk).exists()
    response = get_view_for_user(
        client=client,
        viewname=f"{namespace}:{view_name}-update",
        reverse_kwargs={"slug": o.slug},
        user=admin,
        method=client.post,
        data={"action": "REMOVE", "user": u.pk},
    )
    assert response.status_code == 302
    assert not group.user_set.filter(pk=u.pk).exists()