Пример #1
0
def test_translate_keys_with_list():
    t = Transmission('uri', 'key')
    results = t._translate_keys(recipient_list = 'test')
    assert results['return_path'] == '*****@*****.**'
    assert results['options']['open_tracking'] == True
    assert results['options']['click_tracking'] == True
    assert results['content']['use_draft_template'] == False
    assert results['recipients'] == { 'list_id': 'test' }
Пример #2
0
def test_translate_keys_with_recips():
    t = Transmission('uri', 'key')
    results = t._translate_keys(recipients = ['test', {'key': 'value'}, 'foobar' ])
    assert results['recipients'] == [ { 'address': {'email': 'test'} },
      {'key': 'value'}, {'address': {'email': 'foobar'}}]