# Path: utils/testrail.py
# class APIClient:
# class APIError(Exception):
#     def __init__(self, base_url):
#     def send_get(self, uri, filepath=None):
#     def send_post(self, uri, data):
#     def __send_request(self, method, uri, data):


import os,sys
import conf.testrailenv_conf as conf_file
from utils import testrail
"""
TestRail integration:
* limited to what we need at this time
* we assume TestRail operates in single suite mode
  i.e., the default, reccomended mode

API reference: http://docs.gurock.com/testrail-api2/start
"""
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

class Test_Rail:
    "Wrapper around TestRail's API"
    # Added below to fix PytestCollectionWarning
    __test__ = False

    def __init__(self):
        "Initialize the TestRail objects"
        self.set_testrail_conf()


    def set_testrail_conf(self):
        "Set the TestRail URL and username, password"

        #Set the TestRail URL
        self.testrail_url = conf_file.testrail_url

# Path: utils/testrail.py
# class APIClient:
# class APIError(Exception):
#     def __init__(self, base_url):
#     def send_get(self, uri, filepath=None):
#     def send_post(self, uri, data):
#     def __send_request(self, method, uri, data):


# Path: utils/Test_Rail.py
import os,sys
import conf.testrailenv_conf as conf_file
from utils import testrail

"""
TestRail integration:
* limited to what we need at this time
* we assume TestRail operates in single suite mode
  i.e., the default, reccomended mode

API reference: http://docs.gurock.com/testrail-api2/start
"""
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

class Test_Rail:
    "Wrapper around TestRail's API"
    # Added below to fix PytestCollectionWarning
    __test__ = False

    def __init__(self):
        "Initialize the TestRail objects"
        self.set_testrail_conf()


    def set_testrail_conf(self):
        "Set the TestRail URL and username, password"

        #Set the TestRail URL
        self.testrail_url = conf_file.testrail_url

        self.client = testrail.APIClient(self.testrail_url)