/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-08-12 20:25:28 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110812202528-4xf4a2t23urx50d2
Updated gst to gtk3.

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
 
 
21
19
from bzrlib import (
22
20
    tests,
23
21
    )
29
27
from bzrlib.plugins.gtk import revisionview
30
28
 
31
29
 
32
 
def fake_icon_path(*args):
33
 
    return os.path.join(
34
 
        os.path.dirname(__file__),  '..', 'icons', *args)
35
 
 
36
 
 
37
30
class TestPendingRevisions(tests.TestCaseWithMemoryTransport):
38
31
 
39
 
    def setUp(self):
40
 
        super(TestPendingRevisions, self).setUp()
41
 
        self.overrideAttr(revisionview, 'icon_path', new=fake_icon_path)
42
 
 
43
32
    def assertBufferText(self, text, buffer):
44
33
        """Check the text stored in the buffer."""
45
34
        self.assertEqual(text, buffer.get_text(buffer.get_start_iter(),
53
42
        b = builder.get_branch()
54
43
 
55
44
        rv = revisionview.RevisionView(b)
56
 
        self.addCleanup(rv.destroy)
57
45
        rev = b.repository.get_revision('A')
58
46
        rv.set_revision(rev)
59
47
        self.assertEqual(rev.committer, rv.committer.get_text())
74
62
        b = tree.branch
75
63
 
76
64
        rv = revisionview.RevisionView(b)
77
 
        self.addCleanup(rv.destroy)
78
65
        rev = b.repository.get_revision('A')
79
66
        rv.set_revision(rev)
80
67
 
95
82
        b = tree.branch
96
83
 
97
84
        rv = revisionview.RevisionView(b)
98
 
        self.addCleanup(rv.destroy)
99
85
        rev = b.repository.get_revision('A')
100
86
        rv.set_revision(rev)
101
87