Gentoo Archives: gentoo-commits

From: "Petteri Räty" <betelgeuse@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/council-webapp:master commit in: bot/tests/
Date: Wed, 13 Jul 2011 16:01:40
Message-Id: 2d0ea3df264d8dea133f503ca6fe47279e33e1d2.betelgeuse@gentoo
1 commit: 2d0ea3df264d8dea133f503ca6fe47279e33e1d2
2 Author: Joachim Filip Ignacy Bartosik <jbartosik <AT> gmail <DOT> com>
3 AuthorDate: Wed Jul 13 14:29:40 2011 +0000
4 Commit: Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 13 15:39:26 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/council-webapp.git;a=commit;h=2d0ea3df
7
8 Test for multiple reminders
9
10 ---
11 bot/tests/run_test.py | 13 +++++++++++++
12 1 files changed, 13 insertions(+), 0 deletions(-)
13
14 diff --git a/bot/tests/run_test.py b/bot/tests/run_test.py
15 index bd116ff..0d18cce 100644
16 --- a/bot/tests/run_test.py
17 +++ b/bot/tests/run_test.py
18 @@ -519,6 +519,19 @@ class MeetBotTest(unittest.TestCase):
19
20 test.process('20:13:50 <x> #nextitem')
21
22 + def test_multiple_reminders(self):
23 + test = self.get_simple_agenda_test()
24 + test.process('20:13:50 <x> #timelimit add 0:1 message')
25 + test.process('20:13:50 <x> #timelimit add 0:2 other message')
26 + test.process('20:13:50 <x> #timelimit add 0:3 yet another message')
27 + test.log = []
28 + time.sleep(4)
29 + expected_messages = ['message', 'other message', 'yet another message']
30 + messages_match = (expected_messages == test.log)
31 + error_msg = 'Received messages ' + str(test.log) + \
32 + ' didn\'t match expected ' + str(expected_messages)
33 + assert messages_match, error_msg
34 +
35 if __name__ == '__main__':
36 os.chdir(os.path.join(os.path.dirname(__file__), '.'))