# coding: utf-8 from utils.test_config import * from utils.string_utils import * from helix_web_services_client.models import ClientCommand api = api_as_jdoe() rand = random_string() client_id = "test-client-%s" % rand client_command = ClientCommand() client_command.client = client_id client_command.host = None client_command.alt_roots = ['/alt/1', '/alt/2'] api.server_clients_post('localhost', client_command) all_clients = api.server_clients_get('localhost') assert any(b.client == client_id for b in all_clients), "did not find new client" saved_client = api.server_clients_client_get('localhost', client_id) assert saved_client.alt_roots == client_command.alt_roots, "Don't seem to have saved the client view" to_update = ClientCommand() to_update.description = "Update %s" % rand api.server_clients_client_patch('localhost', client_id, to_update) updated = api.server_clients_client_get('localhost', client_id) assert updated.description.strip() == to_update.description.strip(), "did not update description" api.server_clients_client_delete('localhost', client_id) all_clients2 = api.server_clients_get('localhost') assert any(b.client == client_id for b in all_clients2) == False, "did not delete new client"
# | 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_clients.crud.py | |||||
#1 | 19272 | tjuricek |
Python Client SDK test for branches, changes, clients, and commands. Just altered how arrays in query parameters are represented to the server to be consistent with the other clients. |