def test_buildgreeting_two_ideas_unicode(): greeting = u'Welcome to the IdeaLab, [[User:{0}|{0}]]! ' \ u'Here are some ideas that you may want to check out:\n{1}Take' \ u' a look and endorse them, help improve them, or spread the ' \ u'word. --~~~~' ideas = [{'profileid': 5793487, 'profile_title': u'Grants:IdeaLab/Gender-gap admin training'}, {'profileid': 5322427, 'profile_title': u'Grants:IdeaLab/Inspire Grants \u2013 Gender gap campaign'}] print(buildgreeting(greeting, 'ChickensAreCool', ideas)) assert (buildgreeting(greeting, 'ChickensAreCool', ideas) == u'Welcome to the IdeaLab, [[User:ChickensAreCool|ChickensAreCool]]! Here are some ideas that you may want to check out:\n* [[Grants:IdeaLab/Gender-gap admin training]]\n* [[Grants:IdeaLab/Inspire Grants \u2013 Gender gap campaign]]\nTake a look and endorse them, help improve them, or spread the word. --~~~~' )
def test_buildgreeting_two_ideas_unicode(): greeting = u'Welcome to the IdeaLab, [[User:{0}|{0}]]! ' \ u'Here are some ideas that you may want to check out:\n{1}Take' \ u' a look and endorse them, help improve them, or spread the ' \ u'word. --~~~~' ideas = [{ 'profileid': 5793487, 'profile_title': u'Grants:IdeaLab/Gender-gap admin training' }, { 'profileid': 5322427, 'profile_title': u'Grants:IdeaLab/Inspire Grants \u2013 Gender gap campaign' }] print(buildgreeting(greeting, 'ChickensAreCool', ideas)) assert ( buildgreeting(greeting, 'ChickensAreCool', ideas) == u'Welcome to the IdeaLab, [[User:ChickensAreCool|ChickensAreCool]]! Here are some ideas that you may want to check out:\n* [[Grants:IdeaLab/Gender-gap admin training]]\n* [[Grants:IdeaLab/Inspire Grants \u2013 Gender gap campaign]]\nTake a look and endorse them, help improve them, or spread the word. --~~~~' )
def test_buildgreeting_one_idea_ascii(): greeting = u'Welcome to the IdeaLab, [[User:{0}|{0}]]! ' \ u'Here are some ideas that you may want to check out:\n{1}Take' \ u' a look and endorse them, help improve them, or spread the ' \ u'word. --~~~~' ideas = [{'profileid': 5793487, 'profile_title': u'Grants:IdeaLab/Gender-gap admin training'}] assert (buildgreeting(greeting, 'ChickensAreCool', ideas) == "Welcome to the IdeaLab, [[User:ChickensAreCool|ChickensAreCool]]! Here are some ideas that you may want to check out:\n* [[Grants:IdeaLab/Gender-gap admin training]]\nTake a look and endorse them, help improve them, or spread the word. --~~~~" )
def test_buildgreeting_one_idea_ascii(): greeting = u'Welcome to the IdeaLab, [[User:{0}|{0}]]! ' \ u'Here are some ideas that you may want to check out:\n{1}Take' \ u' a look and endorse them, help improve them, or spread the ' \ u'word. --~~~~' ideas = [{ 'profileid': 5793487, 'profile_title': u'Grants:IdeaLab/Gender-gap admin training' }] assert ( buildgreeting(greeting, 'ChickensAreCool', ideas) == "Welcome to the IdeaLab, [[User:ChickensAreCool|ChickensAreCool]]! Here are some ideas that you may want to check out:\n* [[Grants:IdeaLab/Gender-gap admin training]]\nTake a look and endorse them, help improve them, or spread the word. --~~~~" )