/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to tests/test_git_branch.py

All tests are passing again

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
from bzrlib import branch, revision
22
22
 
23
23
from bzrlib.plugins.git import tests
24
 
from bzrlib.plugins.git.gitlib import git_branch
 
24
from bzrlib.plugins.git.gitlib import (
 
25
    git_branch,
 
26
    ids,
 
27
    )
25
28
 
26
29
 
27
30
class TestGitBranch(tests.TestCaseInTempDir):
41
44
        self.assertEqual(revision.NULL_REVISION, thebranch.last_revision())
42
45
        self.assertEqual((0, revision.NULL_REVISION),
43
46
                         thebranch.last_revision_info())
 
47
 
 
48
    def test_last_revision_is_valid(self):
 
49
        tests.run_git('init')
 
50
        self.build_tree(['a'])
 
51
        tests.run_git('add', 'a')
 
52
        tests.run_git('commit', '-m', 'a')
 
53
        head = tests.run_git('rev-parse', 'HEAD').strip()
 
54
 
 
55
        thebranch = branch.Branch.open('.')
 
56
        self.assertEqual(ids.convert_revision_id_git_to_bzr(head),
 
57
                         thebranch.last_revision())