# coding: utf-8 from utils.test_config import * from utils.string_utils import * from helix_web_services_client.models import GroupCommand api = api_as_super() rand = random_string() group_id = "test-group-%s" % rand group_command = GroupCommand() group_command.group = group_id group_command.users = ['jdoe'] group_command.owners = ['jdoe'] api.server_groups_post('localhost', group_command) all_groups = api.server_groups_get('localhost') assert any(b.group == group_id for b in all_groups), "did not find new group" saved_group = api.server_groups_group_get('localhost', group_id) assert saved_group.group == group_command.group assert saved_group.users == group_command.users assert saved_group.owners == group_command.owners to_update = GroupCommand() to_update.users = ['mmustermann'] api.server_groups_group_patch('localhost', group_id, to_update) updated = api.server_groups_group_get('localhost', group_id) assert updated.users == to_update.users api.server_groups_group_delete('localhost', group_id) all_groups2 = api.server_groups_get('localhost') assert any(b.group == group_id for b in all_groups2) == False, "did not delete new group"
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 19553 | swellard | Move and rename clients | ||
//guest/perforce_software/helix-web-services/main/source/clients/2016.1.0/python/tests/default_api.server_groups.crud.py | |||||
#1 | 19307 | tjuricek |
Python Client SDK tests from counters to users Need to treat the job-related models as UserDict instances, which involves some adjustments to the Swagger code generators. |