Skip to content

Commit

Permalink
Release 1.4.2 (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtreminio-dropbox authored Aug 1, 2024
1 parent a21eb9e commit 838351a
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Python >=3.7
Install using `pip`:

```shell
python3 -m pip install dropbox-sign==1.4.1
python3 -m pip install dropbox-sign==1.4.2
```

Alternatively:
Expand Down Expand Up @@ -362,6 +362,6 @@ apisupport@hellosign.com
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 3.0.0
- Package version: 1.4.1
- Package version: 1.4.2
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.1
1.4.2
2 changes: 1 addition & 1 deletion dropbox_sign/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"""


__version__ = "1.4.1"
__version__ = "1.4.2"

# import ApiClient
from dropbox_sign.api_client import ApiClient
Expand Down
10 changes: 6 additions & 4 deletions dropbox_sign/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/1.4.1/python'
self.user_agent = 'OpenAPI-Generator/1.4.2/python'

def __enter__(self):
return self
Expand Down Expand Up @@ -780,10 +780,12 @@ def __gather_params(self, kwargs):

if len(remove_files):
for param in body:
param_value_full = (param, json.dumps(body[param]))
param_value_full = (param, body[param])

# do not change non-JSON values
if not '{' in param_value_full[1] and not '[' in param_value_full[1]:
param_value_full = (param, body[param])
if (not isinstance(body[param], (str, bool, int, float))):
param_value_full = (param, json.dumps(body[param]))

params['form'].append(param_value_full)
else:
params['body'] = param_value
Expand Down
2 changes: 1 addition & 1 deletion dropbox_sign/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 3.0.0\n"\
"SDK Package Version: 1.4.1".\
"SDK Package Version: 1.4.2".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
2 changes: 1 addition & 1 deletion openapi-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ additionalProperties:
generatorLanguageVersion: ">=3.7"
packageName: dropbox_sign
projectName: dropbox-sign
packageVersion: 1.4.1
packageVersion: 1.4.2
sortModelPropertiesByRequiredFlag: true
legacyDiscriminatorBehavior: true
packageAuthor: Dropbox Sign API Team
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from pathlib import Path

NAME = "dropbox-sign"
VERSION = "1.4.1"
VERSION = "1.4.2"
# To install the library, run the following
#
# python setup.py install
Expand Down
8 changes: 5 additions & 3 deletions templates/api_client.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -800,10 +800,12 @@ class Endpoint(object):

if len(remove_files):
for param in body:
param_value_full = (param, json.dumps(body[param]))
param_value_full = (param, body[param])

# do not change non-JSON values
if not '{' in param_value_full[1] and not '[' in param_value_full[1]:
param_value_full = (param, body[param])
if (not isinstance(body[param], (str, bool, int, float))):
param_value_full = (param, json.dumps(body[param]))

params['form'].append(param_value_full)
else:
params['body'] = param_value
Expand Down
42 changes: 42 additions & 0 deletions tests/test_signature_request_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,48 @@ def test_init_allows_binary_file(self):

obj.files[0].close()

def test_init_allows_jsony_chars_in_strings(self):
title = "테스트 - testing japanese characters in subject"
subject = "[テスト]"
message = "{\"テスト - testing message\"}"

request_data = {
"test_mode": True,
"title": title,
"subject": subject,
"message": message,
"signers": [
{
"email_address": "jill@example.com",
"name": "Jill",
"order": 1
}
],
"files": [open(get_base_path() + "/../test_fixtures/pdf-sample.pdf", "rb")]
}

obj = m.SignatureRequestSendRequest.init(request_data)

self.mock_pool.expect_request(
content_type='multipart/form-data',
data=request_data,
response={}
)

self.api.signature_request_send(obj)

fields = self.mock_pool.get_fields()

title_result = fields[1]
subject_result = fields[2]
message_result = fields[3]

self.assertEqual(title_result[1], title)
self.assertEqual(subject_result[1], subject)
self.assertEqual(message_result[1], message)

obj.files[0].close()

def test_signature_request_bulk_create_embedded_with_template(self):
request_class = 'SignatureRequestBulkCreateEmbeddedWithTemplateRequest'
request_data = get_fixture_data(request_class)['default']
Expand Down

0 comments on commit 838351a

Please sign in to comment.