def test_same_hostname_path(self): self.assertEqual( "http://other:80/some", xenapi_inspector.swap_xapi_host( "http://some:80/some", 'other'))
def test_no_path(self): self.assertEqual( "http://otherserver", xenapi_inspector.swap_xapi_host( "http://someserver", 'otherserver'))
def test_swapping(self): self.assertEqual( "http://otherserver:8765/somepath", xenapi_inspector.swap_xapi_host( "http://someserver:8765/somepath", 'otherserver'))