490
490
self.assertEqual(None, self.get_branch().get_push_location())
492
492
def test_get_push_location_exact(self):
493
from bzrlib.config import (branches_config_filename,
493
from bzrlib.config import (locations_config_filename,
494
494
ensure_config_dir_exists)
495
495
ensure_config_dir_exists()
496
fn = branches_config_filename()
496
fn = locations_config_filename()
497
497
print >> open(fn, 'wt'), ("[%s]\n"
498
498
"push_location=foo" %
499
499
self.get_branch().base[:-1])
500
500
self.assertEqual("foo", self.get_branch().get_push_location())
502
502
def test_set_push_location(self):
503
from bzrlib.config import (branches_config_filename,
503
from bzrlib.config import (locations_config_filename,
504
504
ensure_config_dir_exists)
505
505
ensure_config_dir_exists()
506
fn = branches_config_filename()
506
fn = locations_config_filename()
507
507
self.get_branch().set_push_location('foo')
508
508
self.assertFileEqual("[%s]\n"
509
509
"push_location = foo" % self.get_branch().base[:-1],