def test__short__should_return_a_multi_line_string(self): tf1 = TextFormatter(self.record_list) txt = tf1.short() self.assertEqual(len(txt.split("\n")), len(tf1.records))
def test__format__should_call_the_appropriate_method(self): tf1 = TextFormatter(self.record_list) self.assertEqual(tf1.format(mode='short'), tf1.short()) self.assertEqual(tf1.format(mode='long'), tf1.long()) self.assertEqual(tf1.format(mode='table'), tf1.table())