'Test the various ways of changing the case'

def test_change_case(self):

    from calibre.utils.titlecase import titlecase
    self.ae(u'A', icu.upper('a'))
    for x in (u'', None, False, 1):
        self.ae(x, icu.capitalize(x))
    for x in (u'a', u"Alice's    code", u"macdonald's    machIne", u'02    the    wars'):
        self.ae(icu.upper(x), x.upper())
        self.ae(icu.lower(x), x.lower())
        self.ae(icu.title_case(x), titlecase(x).replace(u'machIne', u'Machine'))
        self.ae(icu.capitalize(x), (x[0].upper() + x[1:].lower()))
        self.ae(icu.swapcase(x), x.swapcase())
