def test_add_path_segment_adds_a_path_segment(self): url = URL('https://github.com/zacharyvoase/urlblocks') assert (url.add_path_segment('tree') == 'https://github.com/zacharyvoase/urlblocks/tree') assert (url.add_path_segment('tree/master') == 'https://github.com/zacharyvoase/urlblocks/tree%2Fmaster')