def METHOD_NAME(self):
    self.assertEqual(rebase("foo", "foo/bar", "bar/baz"), "baz")
    self.assertEqual(rebase("foo", "foo", "bar/baz"), "bar/baz")
    self.assertEqual(rebase("foo/bar", "foo", "baz"), "bar/baz")