/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_repository.py

Add tests for generate_file_id.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
class TestGitRepositoryFeatures(tests.TestCaseInTempDir):
51
51
    """Feature tests for GitRepository."""
52
52
 
 
53
    _test_needs_features = [tests.GitCommandFeature]
 
54
 
53
55
    def _do_commit(self):
54
56
        builder = tests.GitBranchBuilder()
55
57
        builder.set_file('a', 'text for a\n', False)
165
167
 
166
168
class TestGitRepository(tests.TestCaseWithTransport):
167
169
 
 
170
    _test_needs_features = [tests.GitCommandFeature]
 
171
 
168
172
    def _do_commit(self):
169
173
        builder = tests.GitBranchBuilder()
170
174
        builder.set_file('a', 'text for a\n', False)
192
196
 
193
197
    def test_all_revision_ids(self):
194
198
        commit_id = self._do_commit()
195
 
        self.assertEquals(
196
 
                set([default_mapping.revision_id_foreign_to_bzr(commit_id)]),
 
199
        self.assertEquals(set(["git-v1:%s" % commit_id]),
197
200
                self.git_repo.all_revision_ids())
198
201
 
199
202
    def test_get_ancestry_null(self):
275
278
class ForeignTestsRepositoryFactory(object):
276
279
 
277
280
    def make_repository(self, transport):
278
 
        return dir.LocalGitControlDirFormat().initialize_on_transport(transport).open_repository()
 
281
        return dir.LocalGitBzrDirFormat().initialize_on_transport(transport).open_repository()