Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Oct 18, 2023
1 parent 380ad67 commit 59e7bbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions compress/compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def __init__(self, api_key :str , customer_name : str):
self.api_key = api_key
self.customer_name = customer_name
self.req = requests.Session()
self.req.base_url = TNGRM_BASE_URL
self.client_id = customer_name + "_client"
#
#/**
Expand All @@ -53,7 +52,7 @@ def __init__(self, api_key :str , customer_name : str):
# }
# */
def get_s3_space(self):
return self.req.post( S3_SPACE,
return self.req.post(TNGRM_BASE_URL + S3_SPACE,
headers={
"Content-Type": "application/json",
},
Expand All @@ -70,11 +69,11 @@ def get_s3_space(self):
# * @returns list of categories of the customer
# */
def get_categories(self):
return self.req.post( GET_CATEGORIES,
return self.req.post(TNGRM_BASE_URL + GET_CATEGORIES,
headers={
"Content-Type": "application/json",
},
body = json.dumps({
body = json.dumps(({
"api_key": self.api_key,
"client_id": self.client_id,
})
Expand Down
3 changes: 1 addition & 2 deletions compress/tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class TestConnection(unittest.TestCase):
#
def setUp(self):
self._conn = requests.Session()
self._conn.base_url = TNGRM_BASE_URL
#
@all_requests
def response_content_success(self, url, request):
Expand All @@ -47,7 +46,7 @@ def response_content_success(self, url, request):
#
def test_raw_get(self):
with HTTMock(self.response_content_success):
resp = self._conn.get("/health")
resp = self._conn.get(TNGRM_BASE_URL + "/health")
self.assertEqual(resp.content, b'response_ok')
self.assertEqual(resp.status_code, 200)
#
Expand Down

0 comments on commit 59e7bbe

Please sign in to comment.