Exemple #1
0
 def test_returns_lower_case(self):
     item = {"title": u'A test'}
     self.assertEqual(first_title_char(item), u'a')
Exemple #2
0
 def test_umlauts_removed(self):
     item = {"title": u'\xe4'}
     self.assertEqual(first_title_char(item), u'a')
Exemple #3
0
 def test_returns_the_first_character_of_title_key(self):
     item = {"title": u"test title", "other": u"another one"}
     self.assertEqual(first_title_char(item), u"t")
Exemple #4
0
 def test_supports_plain_string(self):
     item = {"title": "test title"}
     self.assertEqual(first_title_char(item), u"t")
 def test_umlauts_removed(self):
     item = {"title": u'\xe4'}
     self.assertEqual(first_title_char(item), u'a')
 def test_returns_lower_case(self):
     item = {"title": u'A test'}
     self.assertEqual(first_title_char(item), u'a')
 def test_supports_plain_string(self):
     item = {"title": "test title"}
     self.assertEqual(first_title_char(item), u"t")
 def test_returns_the_first_character_of_title_key(self):
     item = {"title": u"test title", "other": u"another one"}
     self.assertEqual(first_title_char(item), u"t")
 def group_by_key(item):
     return first_title_char(item)