def test_function_mergeLetters_case_maximal_values(self): statistic = [([u'а'], 20), ([u'б'], 20), ([u'в'], 20), ([u'г'], 20), ([u'д'], 20), ([u'е'], 20), ([u'ж'], 10), ([u'з'], 0), ([u'и'], 5)] outputData = [[u'а'], [u'б'], [u'в'], [u'г'], [u'д'], [u'е'], [u'ж', u'з', u'и']] self.assertEqual(views.mergeLetters(statistic), outputData)
def test_function_mergeLetters_normal_case(self): statistic = [([u'а'], 5), ([u'б'], 3), ([u'в'], 7), ([u'г'], 3), ([u'д'], 8), ([u'е'], 4), ([u'ж'], 4), ([u'з'], 6), ([u'и'], 3)] outputData = [[u'а', u'б'], [u'в'], [u'г'], [u'д'], [u'е', u'ж'], [u'з', u'и']] self.assertEqual(views.mergeLetters(statistic), outputData)