def reset_all_groups():
 useradmin.conf.DEFAULT_USER_GROUP.set_for_testing(None)
 for grp in Group.objects.all():
  grp.delete()

def reset_all_groups ( ) : useradmin . conf . DEFAULT_USER_GROUP . set_for_testing ( None ) for grp in Group . objects . all ( ) : grp . delete ( )
reset to a clean state by deleting all groups .