3418
3419
matcher = config.LocationMatcher(store, expected_url)
3419
3420
self.assertEquals(expected_location, matcher.location)
3422
def test_branch_name_colo(self):
3423
store = self.get_store(self)
3424
store._load_from_string(dedent("""\
3426
push_location=my{branchname}
3428
matcher = config.LocationMatcher(store, 'file:///,branch=example%3c')
3429
self.assertEqual('example<', matcher.branch_name)
3430
((_, section),) = matcher.get_sections()
3431
self.assertEqual('example<', section.locals['branchname'])
3433
def test_branch_name_basename(self):
3434
store = self.get_store(self)
3435
store._load_from_string(dedent("""\
3437
push_location=my{branchname}
3439
matcher = config.LocationMatcher(store, 'file:///parent/example%3c')
3440
self.assertEqual('example<', matcher.branch_name)
3441
((_, section),) = matcher.get_sections()
3442
self.assertEqual('example<', section.locals['branchname'])
3422
3445
class TestStartingPathMatcher(TestStore):