def test_getsafeurl_unauthed(): """_get_safe_url() with a url without basic auth""" url = 'https://domain.com/project/objects.inv' expected = 'https://domain.com/project/objects.inv' actual = _get_safe_url(url) assert expected == actual
def test_getsafeurl_unauthed(): """_get_safe_url() with a url without basic auth""" url = "https://domain.com/project/objects.inv" expected = "https://domain.com/project/objects.inv" actual = _get_safe_url(url) assert expected == actual
def test_getsafeurl_authed_having_port(): """_get_safe_url() with a url with basic auth having port""" url = 'https://*****:*****@domain.com:8080/project/objects.inv' expected = 'https://[email protected]:8080/project/objects.inv' actual = _get_safe_url(url) assert expected == actual
def test_unauthed(self): """_get_safe_url() with a url without basic auth""" url = 'https://domain.com/project/objects.inv' expected = 'https://domain.com/project/objects.inv' actual = _get_safe_url(url) self.assertEqual(expected, actual)
def test_getsafeurl_authed(): """_get_safe_url() with a url with basic auth""" url = 'https://*****:*****@domain.com/project/objects.inv' expected = 'https://[email protected]/project/objects.inv' actual = _get_safe_url(url) assert expected == actual
def test_getsafeurl_authed_having_port(): """_get_safe_url() with a url with basic auth having port""" url = "https://*****:*****@domain.com:8080/project/objects.inv" expected = "https://[email protected]:8080/project/objects.inv" actual = _get_safe_url(url) assert expected == actual