# coding: utf-8 from utils.test_config import * from utils.string_utils import * from helix_web_services_client.models import Counter api = api_as_super() rand = random_string() counter_spec = Counter() counter_spec.value = "1" api.server_counters_counter_put('localhost', rand, counter_spec) all_counters = api.server_counters_get('localhost') assert any(x.counter == rand for x in all_counters), "did not find new counter" saved = api.server_counters_counter_get('localhost', rand) assert saved.value == counter_spec.value api.server_counters_counter_increment_post('localhost', rand) updated = api.server_counters_counter_get('localhost', rand) assert updated.value == "2" api.server_counters_counter_delete('localhost', rand) all_counters = api.server_counters_get('localhost') assert any(x.counter == rand for x in all_counters) == False, "did not delete counter"
# | 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_counters.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. |