Previously, if get_group_required would return a string, the checker would work fine (see if the group string was inside user.groups). If get_group_required returns a sequence, you would be comparing whether the entire sequence (of possible groups) appears as an entry in user.groups.
Now, check_membership checks whether any of the groups in self.group_required appears in user.groups (as intended, see #35).
Previously, the test modified a group_required property from a GroupRequiredView **instance**, but not from the **class**. When the client is launched to perform a request it instantiates a **new** instance, with the original class variable 'test_groups' and not the intended sequence.
Now the test modified the class variable, so the client can create an instance with the correct attribute. (value is restored before finishing the test).
Similar bug with the instance variable vs class variable, which went undetected because of another bug when modifying the group name. When calling user.groups.all() an object is returned (and then modified), but since its reference is not saved, the changes are lost (rerunning user.groups.all() returns the instance saved in the DB, and not the modified one). That bug prevented the user group from being modified, so the test deceptively passed.