Skip to content

Commit 5e4f6ab

Browse files
Fix bug in _translate_keys that affects non-nested parameters
1 parent 115adec commit 5e4f6ab

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/test_transmissions.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,19 @@ def test_translate_keys_for_from_email():
6666
}
6767

6868

69+
def test_campaign_id():
70+
responses.add(
71+
responses.POST,
72+
'https://api.sparkpost.com/api/v1/transmissions',
73+
status=200,
74+
content_type='application/json',
75+
body='{"results": "yay"}'
76+
)
77+
sp = SparkPost('fake-key')
78+
results = sp.transmission.send(campaign="test")
79+
assert results == 'yay'
80+
81+
6982
def test_format_header_to():
7083
t = Transmissions('uri', 'key')
7184
formatted = t._format_header_to(recipient={

0 commit comments

Comments
 (0)