~ubuntu-branches/debian/sid/trac-bzr/sid

« back to all changes in this revision

Viewing changes to tracbzr/tests/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2009-12-25 15:37:57 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20091225153757-n8v0lixk6pwxep36
Tags: 0.3.0-1
* New upstream release.
* Add watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import os
 
2
import logging
 
3
 
2
4
from os import path
3
5
from shutil import rmtree
4
6
from tempfile import mkdtemp
5
7
 
 
8
from trac import config
6
9
from bzrlib import bzrdir, tests
7
10
 
8
11
from tracbzr import backend
9
12
 
10
13
 
 
14
class DummyComponent(object):
 
15
 
 
16
    def __init__(self):
 
17
        self.log = logging.getLogger('tracbzr.tests')
 
18
        self.log.setLevel(logging.ERROR)
 
19
        self.config = config.Configuration(None)
 
20
 
 
21
 
11
22
class MultiBranchTracTestCase(tests.TestCase):
12
23
 
13
24
    def setUp(self):
25
36
        self.tree = self.branch.bzrdir.open_workingtree()
26
37
 
27
38
    def trac_repo(self):
28
 
        return backend.BzrRepository(self.repo_root, None)
 
39
        return backend.BzrRepository(self.repo_root, DummyComponent())
29
40
 
30
41
    def tearDown(self):
31
42
        super(MultiBranchTracTestCase, self).tearDown()
47
58
        self.treedir = self.root
48
59
 
49
60
    def trac_repo(self):
50
 
        return backend.BzrRepository(self.root, None)
 
61
        return backend.BzrRepository(self.root, DummyComponent())
51
62
 
52
63
    def tearDown(self):
53
64
        super(SingleBranchTracTestCase, self).tearDown()