default_api.server_protections.basic_add-remove_tests.py #1

  • //
  • main/
  • guest/
  • perforce_software/
  • helix-web-services/
  • main/
  • source/
  • client-python/
  • tests/
  • default_api.server_protections.basic_add-remove_tests.py
  • View
  • Commits
  • Open Download .zip Download (646 B)
# coding: utf-8

from utils.test_config import *
from utils.string_utils import *

from helix_web_services_client.models import BranchCommand

api = api_as_super()

protections = api.server_protections_get('localhost')

original_protections = list(protections.protections)

assert len(protections.protections) >= 2

protections.protections.append('super user jdoe * //...')

api.server_protections_put('localhost', protections)

updated = api.server_protections_get('localhost')

assert updated.protections == protections.protections

protections.protections = original_protections

command = api.server_protections_put('localhost', protections)
# 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_protections.basic_add-remove_tests.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.