'Creates group with rule, and adds user to group.'

@staticmethod
def grant_permission(user_obj, rules, name='Test    Group'):

    group = Group.objects.create(name=name, rules=rules)
    GroupUser.objects.create(group=group, user=user_obj)
    return group
