annotate bitten/tests/notify.py @ 534:79dd34e914a7

Merge `BittenNotify` and `BittenNotifyDispatcher` into one component
author mgood
date Mon, 23 Mar 2009 00:07:43 +0000
parents 7c1919719538
children 1f29360d8fd0
rev   line source
533
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
1 #-*- coding: utf-8 -*-
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
2 #
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
3 # Copyright (C) 2007 Ole Trenner, <ole@jayotee.de>
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
4 # All rights reserved.
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
5 #
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
6 # This software is licensed as described in the file COPYING, which
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
7 # you should have received as part of this distribution.
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
8
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
9 import logging
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
10 import os
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
11 import sys
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
12 import unittest
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
13
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
14 from trac.db import DatabaseManager
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
15 from trac.test import EnvironmentStub, Mock
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
16 from bitten.model import *
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
17 from bitten.notify import *
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
18
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
19 ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
20
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
21 class BittenNotifyBaseTest(unittest.TestCase):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
22 def setUp(self):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
23 self.set_up_env()
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
24
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
25 def set_up_env(self):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
26 self.env = EnvironmentStub()
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
27 self.env.get_templates_dir = lambda *args: os.path.join(ROOT, 'bitten', 'templates')
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
28 self.env.path = ''
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
29 self.repos = Mock(get_changeset=lambda rev: Mock(author = 'author'))
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
30 self.env.get_repository = lambda authname = None: self.repos
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
31
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
32 db = self.env.get_db_cnx()
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
33 cursor = db.cursor()
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
34 connector, _ = DatabaseManager(self.env)._get_connector()
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
35 for table in schema:
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
36 for stmt in connector.to_sql(table):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
37 cursor.execute(stmt)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
38 db.commit()
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
39
534
79dd34e914a7 Merge `BittenNotify` and `BittenNotifyDispatcher` into one component
mgood
parents: 533
diff changeset
40 class BittenNotifyTest(BittenNotifyBaseTest):
533
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
41 """unit tests for BittenNotify dispatcher class"""
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
42 def setUp(self):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
43 BittenNotifyBaseTest.setUp(self)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
44 #fixture
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
45 self.state = [False]
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
46 self.email = Mock(notify = lambda buildInfo: \
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
47 self.state.__setitem__(0,True))
534
79dd34e914a7 Merge `BittenNotify` and `BittenNotifyDispatcher` into one component
mgood
parents: 533
diff changeset
48 self.dispatcher = BittenNotify(self.env)
533
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
49 self.dispatcher.email = self.email
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
50 self.failed_build = Build(self.env, status = Build.FAILURE)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
51 self.successful_build = Build(self.env, status = Build.SUCCESS)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
52
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
53 def test_do_notify_on_failed_build(self):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
54 self.env.config.set(CONFIG_SECTION, NOTIFY_ON_FAILURE, 'true')
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
55 self.dispatcher.notify(self.failed_build)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
56 self.assertTrue(self.state[0],
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
57 'notifier should be called for failed builds.')
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
58
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
59 def test_do_not_notify_on_failed_build(self):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
60 self.env.config.set(CONFIG_SECTION, NOTIFY_ON_FAILURE, 'false')
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
61 self.dispatcher.notify(self.failed_build)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
62 self.assertFalse(self.state[0],
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
63 'notifier should not be called for failed build.')
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
64
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
65 def test_do_notify_on_successful_build(self):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
66 self.env.config.set(CONFIG_SECTION, NOTIFY_ON_SUCCESS, 'true')
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
67 self.dispatcher.notify(self.successful_build)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
68 self.assertTrue(self.state[0],
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
69 'notifier should be called for successful builds when configured.')
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
70
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
71 def test_do_not_notify_on_successful_build(self):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
72 self.env.config.set(CONFIG_SECTION, NOTIFY_ON_SUCCESS, 'false')
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
73 self.dispatcher.notify(self.successful_build)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
74 self.assertFalse(self.state[0],
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
75 'notifier shouldn\'t be called for successful build.')
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
76
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
77
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
78 class BuildInfoTest(BittenNotifyBaseTest):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
79 """unit tests for BuildInfo class"""
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
80
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
81 def setUp(self):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
82 BittenNotifyBaseTest.setUp(self)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
83 #fixture
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
84 self.failed_build = Build(self.env,
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
85 config = 'config',
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
86 slave = 'slave',
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
87 rev = 10,
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
88 status = Build.FAILURE)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
89 self.failed_build.id = 1
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
90 self.successful_build = Build(self.env, status = Build.SUCCESS)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
91 self.successful_build.id = 2
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
92 step = BuildStep(self.env,
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
93 build = 1,
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
94 name = 'test',
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
95 status = BuildStep.FAILURE)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
96 step.errors = ['msg']
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
97 step.insert()
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
98 log = BuildLog(self.env, build = 1, step = 'test')
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
99 log.messages = [('info','msg')]
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
100 log.insert()
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
101
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
102 def test_exposed_properties(self):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
103 build_info = BuildInfo(self.env, self.failed_build)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
104 self.assertEquals(self.failed_build.id, build_info.id)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
105 self.assertEquals('Failed', build_info.status)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
106 self.assertEquals('http://example.org/trac.cgi/build/config/1',
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
107 build_info.link)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
108 self.assertEquals('config', build_info.config)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
109 self.assertEquals('slave', build_info.slave)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
110 self.assertEquals('10', build_info.changeset)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
111 self.assertEquals('http://example.org/trac.cgi/changeset/10',
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
112 build_info.changesetlink)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
113 self.assertEquals('author', build_info.author)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
114 self.assertEquals('test: msg', build_info.errors)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
115 self.assertEquals(' info: msg', build_info.faillog)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
116
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
117 def test_exposed_properties_on_successful_build(self):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
118 build_info = BuildInfo(self.env, self.successful_build)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
119 self.assertEquals(self.successful_build.id, build_info.id)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
120 self.assertEquals('Successful', build_info.status)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
121
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
122
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
123 class BittenNotifyEmailTest(BittenNotifyBaseTest):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
124 """unit tests for BittenNotify dispatcher class"""
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
125 def setUp(self):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
126 BittenNotifyBaseTest.setUp(self)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
127 self.env.config.set('notification','smtp_enabled','true')
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
128 #fixture
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
129 self.state = [[]]
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
130 self.email = BittenNotifyEmail(self.env)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
131 empty = lambda *a, **k : None
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
132 self.email.begin_send = empty
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
133 self.email.finish_send = empty
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
134 self.email.send = lambda to, cc, hdrs = {} : \
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
135 self.state.__setitem__(0,to)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
136 self.build_info = BuildInfo(self.env, Build(self.env,
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
137 status = Build.SUCCESS))
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
138 self.build_info['author'] = 'author'
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
139
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
140 def test_notification_uses_default_address(self):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
141 self.email.notify(self.build_info)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
142 self.assertTrue('author' in self.state[0],
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
143 'recipient list should contain plain author')
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
144
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
145 def test_notification_uses_custom_address(self):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
146 self.env.get_known_users = lambda cnx = None : [('author',
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
147 'Author\'s Name',
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
148 'author@email.com')]
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
149 self.email.notify(self.build_info)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
150 self.assertTrue('author@email.com' in self.state[0],
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
151 'recipient list should contain custom author\'s email')
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
152
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
153 def test_notification_discards_invalid_address(self):
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
154 self.env.get_known_users = lambda cnx = None : [('author',
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
155 'Author\'s Name',
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
156 '')]
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
157 self.email.notify(self.build_info)
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
158 self.assertTrue('author' in self.state[0],
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
159 'recipient list should only use valid custom address')
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
160
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
161
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
162 def suite():
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
163 suite = unittest.TestSuite()
534
79dd34e914a7 Merge `BittenNotify` and `BittenNotifyDispatcher` into one component
mgood
parents: 533
diff changeset
164 suite.addTest(unittest.makeSuite(BittenNotifyTest,'test'))
533
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
165 suite.addTest(unittest.makeSuite(BuildInfoTest,'test'))
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
166 suite.addTest(unittest.makeSuite(BittenNotifyEmailTest,'test'))
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
167 return suite
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
168
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
169 if __name__ == '__main__':
7c1919719538 Fix line endings and trailing whitespace in new notification files
mgood
parents: 531
diff changeset
170 unittest.main(defaultTest='suite')
Copyright (C) 2012-2017 Edgewall Software