Skip to content

Commit

Permalink
Fix utils test and add an extra test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sander Smits committed Jul 30, 2015
1 parent 822ef2f commit b047685
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,13 @@ def test_add_items_to_message():
msg = "log message"
items = {'user': 'benny', 'email': 'benny@example.com'}
msg = add_items_to_message(msg, items)
assert msg == 'log message user=benny email=benny@example.com'
assert msg.startswith('log message')
assert 'user=benny' in msg
assert 'email=benny@example.com' in msg


def test_add_items_to_message_with_empty_items():
msg = "log message"
items = {}
msg = add_items_to_message(msg, items)
assert msg == 'log message'

0 comments on commit b047685

Please sign in to comment.