23 lines
626 B
Python
23 lines
626 B
Python
# -*- coding: utf-8 -*-
|
|
# author: sherry
|
|
|
|
import os
|
|
from core.rest_client import RestClient
|
|
from common.read_data import data
|
|
|
|
BASE_PATH = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
|
data_file_path = os.path.join(BASE_PATH, "config", "setting.ini")
|
|
test3_garden_url = data.load_ini(data_file_path)["host"]["test3_garden_url"]
|
|
|
|
|
|
class Garden(RestClient):
|
|
|
|
def __init__(self, test3_garden_url, **kwargs):
|
|
super(Garden, self).__init__(test3_garden_url, **kwargs)
|
|
|
|
def login(self, **kwargs):
|
|
return self.post("/api/common/xthy-sso/api/login", **kwargs)
|
|
|
|
|
|
garden = Garden(test3_garden_url)
|