Fix incorrect uses of smart_text
Add unicode_literals import to tests module