'Verify that the masquerade works for the specified group id.'

def _verify_masquerade_for_group(self, group):

    self.ensure_masquerade_as_group_member(self.user_partition.id, (group.id if (group is not None) else None))
    scheme = self.user_partition.scheme
    self.assertEqual(scheme.get_group_for_user(self.course.id, self.test_user, self.user_partition), group)
