~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_smart.py

  • Committer: Patch Queue Manager
  • Date: 2012-02-14 18:29:43 UTC
  • mfrom: (6404.6.11 cached-branch-store)
  • Revision ID: pqm@pqm.ubuntu.com-20120214182943-vso6j0mqdnxfkp7s
(vila) Cache the branch config store to avoid useless IOs. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2011 Canonical Ltd
 
1
# Copyright (C) 2006-2012 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
1323
1323
        finally:
1324
1324
            branch.unlock()
1325
1325
        self.assertEqual(smart_req.SuccessfulSmartServerResponse(()), response)
 
1326
        # Refresh branch as SetParentLocation modified it
 
1327
        branch = branch.bzrdir.open_branch()
1326
1328
        self.assertEqual(None, branch.get_parent())
1327
1329
 
1328
1330
    def test_set_parent_something(self):
1332
1334
        branch_token, repo_token = self.get_lock_tokens(branch)
1333
1335
        try:
1334
1336
            response = request.execute('base', branch_token, repo_token,
1335
 
            'http://bar/')
 
1337
                                       'http://bar/')
1336
1338
        finally:
1337
1339
            branch.unlock()
1338
1340
        self.assertEqual(smart_req.SuccessfulSmartServerResponse(()), response)
1339
 
        self.assertEqual('http://bar/', branch.get_parent())
 
1341
        refreshed = _mod_branch.Branch.open(branch.base)
 
1342
        self.assertEqual('http://bar/', refreshed.get_parent())
1340
1343
 
1341
1344
 
1342
1345
class TestSmartServerBranchRequestGetTagsBytes(