/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to tests/test_revisionview.py

  • Committer: Curtis Hovey
  • Date: 2011-09-01 12:28:35 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110901122835-yn5z2mxqetzh6hb7
Update tests to get the correct icon when bzr-gtk is not installed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Test the RevisionView functionality."""
18
18
 
 
19
import os
 
20
 
19
21
from bzrlib import (
20
22
    tests,
21
23
    )
27
29
from bzrlib.plugins.gtk import revisionview
28
30
 
29
31
 
 
32
def fake_icon_path(*args):
 
33
    return os.path.join(
 
34
        os.path.dirname(__file__),  '..', 'icons', *args)
 
35
 
 
36
 
30
37
class TestPendingRevisions(tests.TestCaseWithMemoryTransport):
31
38
 
 
39
    def setUp(self):
 
40
        super(TestPendingRevisions, self).setUp()
 
41
        self.overrideAttr(revisionview, 'icon_path', new=fake_icon_path)
 
42
 
32
43
    def assertBufferText(self, text, buffer):
33
44
        """Check the text stored in the buffer."""
34
45
        self.assertEqual(text, buffer.get_text(buffer.get_start_iter(),