Skip to content

Commit

Permalink
Merge pull request #95 from jarcoal/master
Browse files Browse the repository at this point in the history
Add support for inline_css
  • Loading branch information
richleland committed Mar 25, 2016
2 parents d5bb1e9 + 931c2e9 commit 95c7679
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sparkpost/transmissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def _translate_keys(self, **kwargs):
model['options']['transactional'] = kwargs.get('transactional')
model['options']['sandbox'] = kwargs.get('use_sandbox')
model['options']['skip_suppression'] = kwargs.get('skip_suppression')
model['options']['inline_css'] = kwargs.get('inline_css')

model['content']['use_draft_template'] = \
kwargs.get('use_draft_template', False)
Expand Down Expand Up @@ -184,6 +185,7 @@ def send(self, **kwargs):
:param bool skip_suppression: Whether or not to ignore customer
suppression rules, for this transmission only. Only applicable if
your configuration supports this parameter. (SparkPost Elite only)
:param bool inline_css: Whether or not to perform CSS inlining
:param dict custom_headers: Used to set any headers associated with
transmission
Expand Down
6 changes: 6 additions & 0 deletions test/test_transmissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ def test_translate_keys_with_bcc():
]


def test_translate_keys_with_inline_css():
t = Transmissions('uri', 'key')
results = t._translate_keys(inline_css=True)
assert results['options'].get('inline_css') is True


@responses.activate
def test_success_send():
responses.add(
Expand Down

0 comments on commit 95c7679

Please sign in to comment.