# coding: utf-8 from utils.test_config import * from utils.string_utils import * from helix_web_services_client.models import BranchCommand api = api_as_jdoe() rand = random_string() branch_id = "test-branch-%s" % rand branch_command = BranchCommand() branch_command.branch = branch_id branch_command.view = [ "//depot/main/%s/... //depot/dev/%s/..." % (branch_id, branch_id) ] exception_thrown = False try: api.server_branches_post('invalid', branch_command) except Exception: exception_thrown = True assert exception_thrown, "no error was raised"