Exemplo n.º 1
0
def test_test_utils():
    """Ensure the BlobStash utils can spawn a server."""
    b = BlobStash()
    b.cleanup()
    try:
        b.run()
        c = Client()
        resp = c.request("GET", "/", raw=True)
        assert resp.status_code == 404
    finally:
        b.shutdown()
        b.cleanup()
Exemplo n.º 2
0
    def __init__(self, base_url=None, api_key=None, client=None):
        if client:
            self._client = client
            return

        self._client = Client(base_url=base_url, api_key=api_key)
Exemplo n.º 3
0
 def __init__(self, base_url: str = None, api_key: str = None) -> None:
     self._client = Client(base_url=base_url,
                           api_key=api_key,
                           json_encoder=JSONEncoder)