Skip to content

Commit

Permalink
changed base url
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Oct 18, 2023
1 parent 0e63883 commit 380ad67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions compress/compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ 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 @@ -52,7 +53,7 @@ def __init__(self, api_key :str , customer_name : str):
# }
# */
def get_s3_space(self):
return self.req.post(TNGRM_BASE_URL + S3_SPACE,
return self.req.post( S3_SPACE,
headers={
"Content-Type": "application/json",
},
Expand All @@ -69,7 +70,7 @@ def get_s3_space(self):
# * @returns list of categories of the customer
# */
def get_categories(self):
return self.req.post(TNGRM_BASE_URL + GET_CATEGORIES,
return self.req.post( GET_CATEGORIES,
headers={
"Content-Type": "application/json",
},
Expand Down
2 changes: 2 additions & 0 deletions compress/tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#
from unittest import mock
import requests
from ..constants import *
from httmock import urlmatch, response, HTTMock, all_requests
#
try:
Expand All @@ -36,6 +37,7 @@ 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 Down

0 comments on commit 380ad67

Please sign in to comment.