8 from unittest
import TestCase, main
18 store_content = StoreContent(
"Name", 42)
20 self.assertEquals(store_content.name,
"Name")
21 self.assertEquals(store_content.number, 42)
24 class TestStoreContentList(
TestCase):
27 content_list = [StoreContent(
"First", 1), StoreContent(
"Second", 2)]
28 store_content_list = StoreContentList(content_list, 21)
30 self.assertEqual(store_content_list.content, content_list)
31 self.assertEqual(store_content_list.event_number, 21)
34 class TestStatisticsColumn(
TestCase):
37 statistics_column = StatisticsColumn(
"Name")
39 self.assertEqual(statistics_column.name,
"Name")
40 self.assertEqual(statistics_column.display_name,
"Name")
41 self.assertEqual(statistics_column.three_column_format,
False)
43 statistics_column = StatisticsColumn(
"Name",
"DisplayName")
45 self.assertEqual(statistics_column.name,
"Name")
46 self.assertEqual(statistics_column.display_name,
"DisplayName")
47 self.assertEqual(statistics_column.three_column_format,
False)
49 statistics_column = StatisticsColumn(
"Name",
"DisplayName",
True)
51 self.assertEqual(statistics_column.name,
"Name")
52 self.assertEqual(statistics_column.display_name,
"DisplayName")
53 self.assertEqual(statistics_column.three_column_format,
True)
59 test_columns = [StatisticsColumn(
"Name"), StatisticsColumn(
"OtherName")]
60 test_modules = [1, 2, 3]
61 statistics = Statistics(test_columns, test_modules)
63 self.assertEqual(statistics.columns, test_columns)
64 self.assertEqual(statistics.modules, test_modules)
67 if __name__ ==
"__main__":