43
43
class BzrNotifyTestCase(tests.TestCase):
46
top = os.path.abspath(os.path.join(
47
os.path.dirname(__file__), os.pardir))
48
self.script = os.path.join(top, 'bzr-notify')
49
self.env = dict(os.environ)
50
self.env['BZR_PLUGINS_AT'] = 'gtk@%s' % top
51
super(BzrNotifyTestCase, self).setUp()
45
53
def test_smoketest(self):
46
54
# This is a smoke test to verify the process starts.
47
55
# The logic of the module must be moved into notify.py
48
56
# where it can be properly tested.
49
script = os.path.join(
50
os.path.dirname(__file__), os.pardir, 'bzr-notify')
51
57
bzr_notify = subprocess.Popen(
52
[script, 'test'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
58
[self.script, 'test'],
59
stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=self.env)
53
60
stdout, stderr = bzr_notify.communicate()
54
61
self.assertEqual('', stdout)
55
self.assertEqual('', stderr)
64
'', 'ERROR:root:Could not find any typelib for AppIndicator3\n'))