Skip to content

Commit 20db1b1

Browse files
committed
20200928 update 1: update test data folder
1 parent 33fcb4d commit 20db1b1

24 files changed

+27
-5
lines changed

asposecellscloud/apis/cells_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ def __init__(self,appsid, appkey, version='v3.0', base_uri= 'https://api.aspose.
5858
config.api_client = ApiClient()
5959
self.api_client = config.api_client
6060
self.api_client.set_default_header("Authorization", "Bearer " + self.access_token)
61-
self.get_access_token_time = time.clock()
61+
self.get_access_token_time = time.process_time()
6262
# self.api_client.set_default_header("Authorization", "Bearer " + self.auth_data.access_token)
6363

6464
def check_access_token(self):
6565
if self.access_token:
66-
timediff = time.clock() - self.get_access_token_time
66+
timediff = time.process_time() - self.get_access_token_time
6767
if timediff > 86300 :
6868
api_client = ApiClient(self.base_uri)
6969
self.access_token = api_client.get_access_token("client_credentials", self.appsid, self.appkey,self.version)
7070
self.api_client.set_default_header("Authorization", "Bearer " + self.access_token)
71-
self.get_access_token_time = time.clock()
71+
self.get_access_token_time = time.process_time()
7272

7373
def cells_auto_filter_delete_worksheet_date_filter(self, name, sheet_name, field_index, date_time_grouping_type, **kwargs):
7474
"""

test/AuthUtil.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from asposecellscloud.rest import ApiException
1111
from asposecellscloud.apis.cells_api import CellsApi
1212
from asposecellscloud.api_client import ApiClient
13-
import asposestoragecloud
13+
1414

1515
grantType = "client_credentials"
1616
clientId = "91A2FD07-BBA1-4B32-9112-ABFB1FE8AEBD"
@@ -41,7 +41,7 @@ def Ready(api, filename, folder, storage=None):
4141

4242

4343
path = folder + '/' + filename
44-
fullfilename = "D:/Projects/Aspose/Aspose.Cells.Cloud.SDK/src/TestData/" + filename
44+
fullfilename = "TestData/" + filename
4545
response = api.upload_file(path, fullfilename)
4646
return response
4747

test/test_cells_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class TestCellsApi(unittest.TestCase):
2222
""" CellsApi unit test stubs """
2323

2424
def setUp(self):
25+
warnings.simplefilter('ignore', ResourceWarning)
2526
global global_api
2627
if global_api is None:
2728
global_api = asposecellscloud.apis.cells_api.CellsApi(AuthUtil.GetAPPSID(),AuthUtil.GetAPPKey(),"v3.0",'https://api-qa.aspose.cloud')

test/test_cells_auto_filter_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class TestCellsAutoFilterApi(unittest.TestCase):
3434
""" CellsAutoFilterApi unit test stubs """
3535

3636
def setUp(self):
37+
warnings.simplefilter('ignore', ResourceWarning)
3738
global global_api
3839
if global_api is None:
3940
global_api = asposecellscloud.apis.cells_api.CellsApi(AuthUtil.GetAPPSID(),AuthUtil.GetAPPKey(),"v3.0",AuthUtil.GetBaseUrl())

test/test_cells_autoshapes_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class TestCellsAutoshapesApi(unittest.TestCase):
1919
""" CellsAutoshapesApi unit test stubs """
2020

2121
def setUp(self):
22+
warnings.simplefilter('ignore', ResourceWarning)
2223
global global_api
2324
if global_api is None:
2425
global_api = asposecellscloud.apis.cells_api.CellsApi(AuthUtil.GetAPPSID(),AuthUtil.GetAPPKey(),"v3.0",AuthUtil.GetBaseUrl())

test/test_cells_chart_area_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class TestCellsChartAreaApi(unittest.TestCase):
3030
""" CellsChartAreaApi unit test stubs """
3131

3232
def setUp(self):
33+
warnings.simplefilter('ignore', ResourceWarning)
3334
global global_api
3435
if global_api is None:
3536
global_api = asposecellscloud.apis.cells_api.CellsApi(AuthUtil.GetAPPSID(),AuthUtil.GetAPPKey(),"v3.0",AuthUtil.GetBaseUrl())

test/test_cells_charts_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class TestCellsChartsApi(unittest.TestCase):
3232
""" CellsChartsApi unit test stubs """
3333

3434
def setUp(self):
35+
warnings.simplefilter('ignore', ResourceWarning)
3536
global global_api
3637
if global_api is None:
3738
global_api = asposecellscloud.apis.cells_api.CellsApi(AuthUtil.GetAPPSID(),AuthUtil.GetAPPKey(),"v3.0",AuthUtil.GetBaseUrl())

test/test_cells_conditional_formattings_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class TestCellsConditionalFormattingsApi(unittest.TestCase):
3030
""" CellsConditionalFormattingsApi unit test stubs """
3131

3232
def setUp(self):
33+
warnings.simplefilter('ignore', ResourceWarning)
3334
global global_api
3435
if global_api is None:
3536
global_api = asposecellscloud.apis.cells_api.CellsApi(AuthUtil.GetAPPSID(),AuthUtil.GetAPPKey(),"v3.0",AuthUtil.GetBaseUrl())

test/test_cells_hypelinks_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class TestCellsHypelinksApi(unittest.TestCase):
3030
""" CellsHypelinksApi unit test stubs """
3131

3232
def setUp(self):
33+
warnings.simplefilter('ignore', ResourceWarning)
3334
global global_api
3435
if global_api is None:
3536
global_api = asposecellscloud.apis.cells_api.CellsApi(AuthUtil.GetAPPSID(),AuthUtil.GetAPPKey(),"v3.0",AuthUtil.GetBaseUrl())

test/test_cells_list_objects_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class TestCellsListObjectsApi(unittest.TestCase):
3232
""" CellsListObjectsApi unit test stubs """
3333

3434
def setUp(self):
35+
warnings.simplefilter('ignore', ResourceWarning)
3536
global global_api
3637
if global_api is None:
3738
global_api = asposecellscloud.apis.cells_api.CellsApi(AuthUtil.GetAPPSID(),AuthUtil.GetAPPKey(),"v3.0",AuthUtil.GetBaseUrl())

0 commit comments

Comments
 (0)