Skip to content

Commit

Permalink
added some tests for fringe cases of unicode sandwich
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean Malmgren committed Apr 6, 2015
1 parent 9e7314a commit 2eb0d3a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_placeholder.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,19 @@ def test_fancy_gmail_john(self):
'My email is {{EMAIL}}',
'john AT gmail.com is not replaced with {{EMAIL}}',
)

def test_empty(self):
"""Make sure this returns an empty string"""
self.assertEqual(
scrubadub.clean_with_placeholders(''),
'',
'empty string is not preserved',
)

def test_unicode(self):
"""Make sure unicode works, too"""
self.assertEqual(
scrubadub.clean_with_placeholders(u'John is a cat'),
'{{NAME}} is a cat',
'unicode strings work too',
)

0 comments on commit 2eb0d3a

Please sign in to comment.