Example #1
0
 def test_returns_lower_case(self):
     item = {"title": u'A test'}
     self.assertEqual(first_title_char(item), u'a')
Example #2
0
 def test_umlauts_removed(self):
     item = {"title": u'\xe4'}
     self.assertEqual(first_title_char(item), u'a')
Example #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")
Example #4
0
 def test_supports_plain_string(self):
     item = {"title": "test title"}
     self.assertEqual(first_title_char(item), u"t")
Example #5
0
 def test_umlauts_removed(self):
     item = {"title": u'\xe4'}
     self.assertEqual(first_title_char(item), u'a')
Example #6
0
 def test_returns_lower_case(self):
     item = {"title": u'A test'}
     self.assertEqual(first_title_char(item), u'a')
Example #7
0
 def test_supports_plain_string(self):
     item = {"title": "test title"}
     self.assertEqual(first_title_char(item), u"t")
Example #8
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")
 def group_by_key(item):
     return first_title_char(item)