Skip to content

Commit a4e576a

Browse files
committed
Fix typos
1 parent 5e835fc commit a4e576a

File tree

3 files changed

+3
-36
lines changed

3 files changed

+3
-36
lines changed

asposepdfcloud/api_client.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,6 @@ def __call_api(self, resource_path, method,
166166
guess_type(filename)[0] or 'application/octet-stream'
167167
header_params['Content-Type'] = mimetype
168168

169-
170-
# auth setting
171-
self.update_params_for_auth(header_params, query_params, auth_settings)
172-
173169
# body
174170
if body:
175171
body = self.sanitize_for_serialization(body)
@@ -611,33 +607,6 @@ def select_header_content_type(self, content_types):
611607
else:
612608
return content_types[0]
613609

614-
def update_params_for_auth(self, headers, querys, auth_settings):
615-
"""
616-
Updates header and query params based on authentication setting.
617-
618-
:param headers: Header parameters dict to be updated.
619-
:param querys: Query parameters tuple list to be updated.
620-
:param auth_settings: Authentication setting identifiers list.
621-
"""
622-
config = Configuration()
623-
624-
if not auth_settings:
625-
return
626-
627-
for auth in auth_settings:
628-
auth_setting = config.auth_settings().get(auth)
629-
if auth_setting:
630-
if not auth_setting['value']:
631-
continue
632-
elif auth_setting['in'] == 'header':
633-
headers[auth_setting['key']] = auth_setting['value']
634-
elif auth_setting['in'] == 'query':
635-
querys.append((auth_setting['key'], auth_setting['value']))
636-
else:
637-
raise ValueError(
638-
'Authentication token must be in `query` or `header`'
639-
)
640-
641610
def __deserialize_file(self, response):
642611
"""
643612
Saves response body into a file in a temporary folder,

test-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
asposestoragecloud == 1.0.1
21
requests >= 2.18.4
32
coverage >= 4.0.3
43
nose >= 1.3.7

test/pdf_tests.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ def testGetDownloadDocumentAttachmentByIndex(self):
13251325
}
13261326

13271327
response = self.pdf_api.get_download_document_attachment_by_index(file_name, attachment_index, **opts)
1328-
self.assertIsInstance(response, str);
1328+
self.assertIsInstance(response, str)
13291329

13301330

13311331
# Bookmarks Tests
@@ -2705,7 +2705,6 @@ def testDeleteDocumentLinkAnnotations(self):
27052705
file_name = 'PdfWithLinks.pdf'
27062706
self.uploadFile(file_name)
27072707

2708-
page_number = 1
27092708
opts = {
27102709
"folder" : self.temp_folder
27112710
}
@@ -3259,7 +3258,7 @@ def testGetVerifySignature(self):
32593258
}
32603259

32613260
response = self.pdf_api.get_verify_signature(file_name, signature.form_field_name, **opts)
3262-
self.assertEqual(response_sign.code, 200)
3261+
self.assertEqual(response.code, 200)
32633262

32643263

32653264
# Text Replace Tests
@@ -3371,7 +3370,7 @@ def testPutAddText(self):
33713370
background_color=background_color,
33723371
font_style=asposepdfcloud.models.FontStyles.BOLD)
33733372

3374-
segment = asposepdfcloud.models.Segment(value='segment 1', text_state=text_state);
3373+
segment = asposepdfcloud.models.Segment(value='segment 1', text_state=text_state)
33753374

33763375
text_line = asposepdfcloud.models.TextLine(horizontal_alignment=asposepdfcloud.models.TextHorizontalAlignment.RIGHT,
33773376
segments=[segment])

0 commit comments

Comments
 (0)