def test_removes_umlauts(self): string = u'\xe4' self.assertEqual(normalise_string(string), u'a')
def test_supports_decomposed_unicode(self): string = u'a\u0308' self.assertEqual(normalise_string(string), u'a')
def test_supports_plain_string(self): string = "test" self.assertEqual(normalise_string(string), u"test")
def test_returns_lower_case(self): string = u'A tEst' self.assertEqual(normalise_string(string), u'a test')
def item_sort_key(item): return (to_human_sortable_key(repo_refnum(item)), normalise_string(item['title']), item['title'], item['decision_number'])
def test_supports_empty_string(self): string = None self.assertEqual(normalise_string(string), None)
def item_sort_key(item): return (to_human_sortable_key(item['dossier_reference_number']), normalise_string(item['title']), item['title'], item['decision_number'])
def item_sort_key(item): return (normalise_string(item['repository_folder_title']), item['repository_folder_title'], normalise_string(item['title']), item['title'], item['decision_number'])
def item_sort_key(item): return (normalise_string(item['repository_folder_title']), item['repository_folder_title'], normalise_string( item['title']), item['title'], item['decision_number'])