~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_branch.py

  • Committer: Andrew Bennetts
  • Date: 2010-08-31 07:12:18 UTC
  • mto: This revision was merged to the branch mainline in revision 5401.
  • Revision ID: andrew.bennetts@canonical.com-20100831071218-4kjieu3ejqcdmdom
Use has_id rather than __contains__; expand NEWS entry; add What's New entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
from bzrlib import (
20
20
    branch as _mod_branch,
21
21
    bzrdir,
22
 
    config,
23
22
    delta as _mod_delta,
24
23
    errors,
25
24
    gpg,
618
617
        self.assertEqual(None, self.get_branch().get_push_location())
619
618
 
620
619
    def test_get_push_location_exact(self):
621
 
        b = self.get_branch()
622
 
        config.LocationConfig.from_string(
623
 
            '[%s]\npush_location=foo\n' % (b.base,), b.base, save=True)
 
620
        from bzrlib.config import (locations_config_filename,
 
621
                                   ensure_config_dir_exists)
 
622
        ensure_config_dir_exists()
 
623
        fn = locations_config_filename()
 
624
        open(fn, 'wt').write(("[%s]\n"
 
625
                                  "push_location=foo\n" %
 
626
                                  self.get_branch().base[:-1]))
624
627
        self.assertEqual("foo", self.get_branch().get_push_location())
625
628
 
626
629
    def test_set_push_location(self):