Mercurial > bitten > bitten-test
changeset 536:1f29360d8fd0
Make notification tests enable the components instead of monkey-patching `env.get_templates_dir`
author | mgood |
---|---|
date | Mon, 23 Mar 2009 00:08:00 +0000 |
parents | 6a2dc6cdc4dd |
children | b72243e52317 |
files | bitten/tests/notify.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/tests/notify.py +++ b/bitten/tests/notify.py @@ -16,15 +16,13 @@ from bitten.model import * from bitten.notify import * -ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) class BittenNotifyBaseTest(unittest.TestCase): def setUp(self): self.set_up_env() def set_up_env(self): - self.env = EnvironmentStub() - self.env.get_templates_dir = lambda *args: os.path.join(ROOT, 'bitten', 'templates') + self.env = EnvironmentStub(enable=['trac.*', 'bitten.notify.*']) self.env.path = '' self.repos = Mock(get_changeset=lambda rev: Mock(author = 'author')) self.env.get_repository = lambda authname = None: self.repos @@ -37,6 +35,7 @@ cursor.execute(stmt) db.commit() + class BittenNotifyTest(BittenNotifyBaseTest): """unit tests for BittenNotify dispatcher class""" def setUp(self):