~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Andrew Bennetts
  • Date: 2010-04-20 00:20:00 UTC
  • mto: This revision was merged to the branch mainline in revision 5167.
  • Revision ID: andrew.bennetts@canonical.com-20100420002000-xwwdz7m32af5lm81
Fix test_remote tests that accidentally assumed it was ok to stack mismatched formats.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1223
1223
            len(branch.repository._real_repository._fallback_repositories))
1224
1224
 
1225
1225
    def test_get_stacked_on_real_branch(self):
1226
 
        base_branch = self.make_branch('base', format='1.6')
1227
 
        stacked_branch = self.make_branch('stacked', format='1.6')
 
1226
        base_branch = self.make_branch('base')
 
1227
        stacked_branch = self.make_branch('stacked')
1228
1228
        stacked_branch.set_stacked_on_url('../base')
1229
1229
        reference_format = self.get_repo_format()
1230
1230
        network_name = reference_format.network_name()
1235
1235
            'success', ('branch', branch_network_name))
1236
1236
        client.add_expected_call(
1237
1237
            'BzrDir.find_repositoryV3', ('stacked/',),
1238
 
            'success', ('ok', '', 'no', 'no', 'yes', network_name))
 
1238
            'success', ('ok', '', 'yes', 'no', 'yes', network_name))
1239
1239
        # called twice, once from constructor and then again by us
1240
1240
        client.add_expected_call(
1241
1241
            'Branch.get_stacked_on_url', ('stacked/',),
2191
2191
        """
2192
2192
        # Make a repo with a fallback repo, both using a FakeClient.
2193
2193
        format = remote.response_tuple_to_repo_format(
2194
 
            ('yes', 'no', 'yes', 'fake-network-name'))
 
2194
            ('yes', 'no', 'yes', self.get_repo_format().network_name()))
2195
2195
        repo, client = self.setup_fake_client_and_repository('quack')
2196
2196
        repo._format = format
2197
2197
        fallback_repo, ignored = self.setup_fake_client_and_repository(
2198
2198
            'fallback')
2199
2199
        fallback_repo._client = client
 
2200
        fallback_repo._format = format
2200
2201
        repo.add_fallback_repository(fallback_repo)
2201
2202
        # First the client should ask the primary repo
2202
2203
        client.add_expected_call(