Exemplo n.º 1
0
 def _test_service() -> SimpleService:
     config = ServiceConfiguration()
     config.uris = ["https://dummy/simple/api"]
     service = RequestsClient.create(SimpleService,
                                     user_agent="pytest",
                                     service_config=config)
     return service
def test_repr_service():
    config = ServiceConfiguration()
    config.uris = ["http://one/", "http://two/"]
    service = RequestsClient.create(Service, "user-agent", config)
    assert (
        repr(service) ==
        "Service(requests_session=requests.Session(...), uris=['http://one/', 'http://two/'])"
    )
def post_service(config):
    return RequestsClient.create(AutoDeserializeConfirmService,
                                 'conjure-python/0.0.0', config)
Exemplo n.º 4
0
def confirm_service(config):
    return RequestsClient.create(AutoDeserializeConfirmService,
                                 "conjure-python/0.0.0", config)
Exemplo n.º 5
0
def query_service(config):
    return RequestsClient.create(SingleQueryParamService,
                                 "conjure-python/0.0.0", config)
Exemplo n.º 6
0
def path_service(config):
    return RequestsClient.create(SinglePathParamService,
                                 "conjure-python/0.0.0", config)
Exemplo n.º 7
0
def header_service(config):
    return RequestsClient.create(SingleHeaderService, "conjure-python/0.0.0",
                                 config)
Exemplo n.º 8
0
def body_service(config):
    return RequestsClient.create(AutoDeserializeService,
                                 'conjure-python/0.0.0', config)