def test_remove_groups(self): """Test the removal of groups according to a name""" name = "Foo" create_groups(name) remove_groups(name) community_groups = Group.objects.filter(name__startswith=name) self.assertEqual(list(community_groups), [])
def remove_community_groups(sender, instance, **kwargs): """Remove user groups for a particular Community""" remove_groups(instance.name)