def METHOD_NAME(cls):
    """
    Setup testing users and user groups
    :param cls: Testcase class object
    :return: None
    """
    AuthGroup = apps.get_app_config('auth').get_model('Group')
    Permission = apps.get_app_config('auth').get_model('Permission')
    ContentType = apps.get_app_config('contenttypes').get_model('ContentType')
    Group = apps.get_app_config('core').get_model('Group')
    # set anonymous users
    cls.anonymoususer = get_user_model().get_anonymous()
    # add base group to g3w-admin database
    cls.main_roles = {}
    for gname in (G3W_VIEWER2, G3W_VIEWER1, G3W_EDITOR2, G3W_EDITOR1):
        agroup, created = AuthGroup.objects.get_or_create(name=gname)
        cls.main_roles[gname] = agroup
        if not created:
            pass
    # give permissions to Editor Level 1
    editorPermission = cls.main_roles[G3W_EDITOR1].permissions.all()
    permissionsToAdd = (
        Permission.objects.get(codename='add_user'),
        Permission.objects.get(codename='add_group', content_type=ContentType.objects.get_for_model(AuthGroup)),
    )
    for perm in permissionsToAdd:
        if perm not in editorPermission:
            cls.main_roles[G3W_EDITOR1].permissions.add(perm)
    # Create Admin level 1
    try:
        test_user1 = User.objects.get(username='admin01')
    except:
        test_user1 = User.objects.create_superuser(username='admin01', password='admin01', email='')
        test_user1.save()
        Userbackend(user=test_user1, backend=USER_BACKEND_DEFAULT).save()
    setattr(cls, 'test_user1', test_user1)
    # alias for test_user1 -> test_admin1
    setattr(cls, 'test_admin1', test_user1)
    # Create Admin level 2
    try:
        test_user2 = User.objects.get(username='admin02')
    except:
        test_user2 = User.objects.create_user(username='admin02', password='admin02')
        test_user2.is_superuser = True
        test_user2.save()
        Userbackend(user=test_user2, backend=USER_BACKEND_DEFAULT).save()
    setattr(cls, 'test_user2', test_user2)
    # alias for test_user2 -> test_admin2
    setattr(cls, 'test_admin2', test_user2)
    # create editor and viewers, and editor and viewer group
    # like create by admin user
    # =====================================================
    for euser in EU1:
        user = User.objects.create_user(username=euser, password=euser)
        user.save()
        user.groups.add(cls.main_roles[G3W_EDITOR1])
        Userbackend(user=user, backend=USER_BACKEND_DEFAULT).save()
        setattr(cls, 'test_{}'.format(euser.replace('.', '_')), user)
    for euser in EU2:
        user = User.objects.create_user(username=euser, password=euser)
        user.save()
        user.groups.add(cls.main_roles[G3W_EDITOR2])
        Userbackend(user=user, backend=USER_BACKEND_DEFAULT).save()
        setattr(cls, 'test_{}'.format(euser.replace('.', '_')), user)
    for euser in VU1:
        user = User.objects.create_user(username=euser, password=euser)
        user.save()
        user.groups.add(cls.main_roles[G3W_VIEWER1])
        Userbackend(user=user, backend=USER_BACKEND_DEFAULT).save()
        setattr(cls, 'test_{}'.format(euser.replace('.', '_')), user)
    # create user groups
    for ugroup in GU:
        ug, created = AuthGroup.objects.get_or_create(name=ugroup[0])
        if created:
            ug.role = ugroup[1]
            ug.save()
            GroupRole(group=ug, role=ugroup[1]).save()
        setattr(cls, 'test_{}'.format(ugroup[0].replace('-', '_').lower()), ug)
    # Add users editor and viewers to user groups
    # editor2 and editor 2.3 -> GU-EDITOR1
    # editor2.1 -> GU-EDITOR2
    # viewer1 adn viewer1.2 -> GU-VIEWER1
    # viewer1.3 -> GU-VIEWER2
    cls.test_editor2.groups.add(cls.test_gu_editor1)
    cls.test_editor2_3.groups.add(cls.test_gu_editor1)
    cls.test_editor2_2.groups.add(cls.test_gu_editor2)
    cls.test_viewer1.groups.add(cls.test_gu_viewer1)
    cls.test_viewer1_2.groups.add(cls.test_gu_viewer1)
    cls.test_viewer1_3.groups.add(cls.test_gu_viewer2)