1296
1298
self.assertEquals(u'', self._get_commit_message())
1297
1299
self.assertEquals(u'de',
1298
1300
self._get_file_commit_messages())
1303
class BzrHandlePatchTestCase(tests.TestCase):
1306
top = os.path.abspath(os.path.join(
1307
os.path.dirname(__file__), os.pardir))
1308
self.script = os.path.join(top, 'bzr-handle-patch')
1309
self.env = dict(os.environ)
1310
self.env['BZR_PLUGINS_AT'] = 'gtk@%s' % top
1311
self.patch = NamedTemporaryFile()
1312
self.patch.write('\n'.join([
1313
"=== added file '_test.txt'",
1314
"--- _test.txt 1970-01-01 00:00:00 +0000",
1315
"+++ _test.txt 2012-02-03 20:00:34 +0000",
1320
super(BzrHandlePatchTestCase, self).setUp()
1322
def test_smoketest(self):
1323
# This is a smoke test to verify the process starts.
1324
bzr_notify = subprocess.Popen(
1325
[self.script, self.patch.name, 'test'],
1326
stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=self.env)
1327
stdout, stderr = bzr_notify.communicate()
1328
self.assertEqual('', stdout)
1329
self.assertEqual('', stderr)