From 6bbf783a2e582d449366971a8c0e7b94d0744758 Mon Sep 17 00:00:00 2001 From: Simon Hanna Date: Tue, 17 May 2016 21:31:56 +0200 Subject: [PATCH] Add test --- tests/functional/openlp_core_common/test_actions.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/functional/openlp_core_common/test_actions.py b/tests/functional/openlp_core_common/test_actions.py index 2b2d735bb..a2f57e969 100644 --- a/tests/functional/openlp_core_common/test_actions.py +++ b/tests/functional/openlp_core_common/test_actions.py @@ -111,6 +111,17 @@ class TestCategoryActionList(TestCase): self.assertEqual(self.list.actions[0], (41, self.action2)) self.assertEqual(self.list.actions[1], (42, self.action1)) + def iterator_test(self): + """ + Test the __iter__ and __next__ methods + """ + self.list.add(self.action1) + self.list.add(self.action2) + + l = [a for a in self.list] + self.assertIs(l[0], self.action1) + self.assertIs(l[1], self.action2) + def remove_test(self): """ Test the remove() method