import os
import sys
project_dir = os.path.dirname(os.path.abspath(__file__)) + '/../..'
# print "project_dir: %s\n" % project_dir
sys.path.insert(0, project_dir)
from helix_web_services_client import ApiClient, configuration
from helix_web_services_client.apis import DefaultApi
from helix_web_services_client.models import LoginRequest
def api_no_login():
api_client = ApiClient('http://localhost:9000/api')
default_api = DefaultApi(api_client)
return default_api
def api_as_jdoe():
api = api_no_login()
login_request = LoginRequest()
login_request.user = 'jdoe'
login_request.password = 'johndoe1A!'
login_response = api.login_post(login_request)
configuration.api_key['Authorization'] = login_response.ticket
return api
def api_as_super():
api = api_no_login()
login_request = LoginRequest()
login_request.user = 'super'
login_request.password = 'superuser1A!'
login_response = api.login_post(login_request)
configuration.api_key['Authorization'] = login_response.ticket
return api
# |
Change |
User |
Description |
Committed |
|
#2
|
19597 |
swellard |
Refactor REST path |
|
|
#1
|
19553 |
swellard |
Move and rename clients |
|
|
//guest/perforce_software/helix-web-services/main/source/clients/2016.1.0/python/tests/utils/test_config.py |
#2
|
19270 |
tjuricek |
Add config, login, branches tests for python SDK and try to add more logging information. |
|
|
#1
|
19269 |
tjuricek |
Create infrastructure for calling python tests via TestNG, with our first (basic login) test. |
|
|