def test_entry_create_author_string_unicode(self): entry = EntryFactory() author = AuthorFactory() entry.authors.append(author) authorstring = entry.create_author_string() self.assertEqual(authorstring, author.name) author2 = AuthorFactory(name=u"Tĕstá ĀũʈĥőŘ") entry.authors.append(author2) authorstring = entry.create_author_string() self.assertEqual(authorstring, u'{0}, {1}'.format(author.name, author2.name))
def test_entry_create_author_string(self): entry = EntryFactory() author = AuthorFactory() entry.authors.append(author) authorstring = entry.create_author_string() self.assertEqual(authorstring, author.name) author2 = AuthorFactory() entry.authors.append(author2) authorstring = entry.create_author_string() self.assertEqual(authorstring, '{0}, {1}'.format(author.name, author2.name))