示例#1
0
 def test_no_stacked_on_url(self):
     # By default, a MirroredBranchPolicy does not stack branches.
     policy = MirroredBranchPolicy()
     # This implementation of the method doesn't actually care about the
     # arguments.
     self.assertIs(
         None, policy.getStackedOnURLForDestinationBranch(None, None))
示例#2
0
 def test_no_stacked_on_url(self):
     # By default, a MirroredBranchPolicy does not stack branches.
     policy = MirroredBranchPolicy()
     # This implementation of the method doesn't actually care about the
     # arguments.
     self.assertIs(None,
                   policy.getStackedOnURLForDestinationBranch(None, None))
示例#3
0
 def test_stacked_on_url_for_mirrored_branch(self):
     # If the default stacked-on URL is also the URL for the branch being
     # mirrored, then the stacked-on URL for destination branch is None.
     stacked_on_url = '/foo'
     policy = MirroredBranchPolicy(stacked_on_url)
     destination_url = 'http://example.com/foo'
     self.assertIs(
         None,
         policy.getStackedOnURLForDestinationBranch(None, destination_url))
示例#4
0
 def test_specified_stacked_on_url(self):
     # If a default stacked-on URL is specified, then the
     # MirroredBranchPolicy will tell branches to be stacked on that.
     stacked_on_url = '/foo'
     policy = MirroredBranchPolicy(stacked_on_url)
     destination_url = 'http://example.com/bar'
     self.assertEqual(
         '/foo',
         policy.getStackedOnURLForDestinationBranch(None, destination_url))
示例#5
0
 def test_stacked_on_url_for_mirrored_branch(self):
     # If the default stacked-on URL is also the URL for the branch being
     # mirrored, then the stacked-on URL for destination branch is None.
     stacked_on_url = '/foo'
     policy = MirroredBranchPolicy(stacked_on_url)
     destination_url = 'http://example.com/foo'
     self.assertIs(
         None,
         policy.getStackedOnURLForDestinationBranch(None, destination_url))
示例#6
0
 def test_specified_stacked_on_url(self):
     # If a default stacked-on URL is specified, then the
     # MirroredBranchPolicy will tell branches to be stacked on that.
     stacked_on_url = '/foo'
     policy = MirroredBranchPolicy(stacked_on_url)
     destination_url = 'http://example.com/bar'
     self.assertEqual(
         '/foo',
         policy.getStackedOnURLForDestinationBranch(None, destination_url))