def test_endpoint_url_should_use_base_path(): test = SonarQube(base_path='/testing') assert "http://localhost:9000/testing{}".format(test.AUTH_VALIDATION_ENDPOINT.path) == \ test.endpoint_url(test.AUTH_VALIDATION_ENDPOINT)
def test_endpoint_url_should_use_port(): sq = SonarQube(port=9001) assert "http://localhost:9001{}".format(sq.AUTH_VALIDATION_ENDPOINT.path) == \ sq.endpoint_url(sq.AUTH_VALIDATION_ENDPOINT)
def test_endpoint_url_should_use_host(): sq = SonarQube(host='http://myhost') assert "http://myhost:9000{}".format(sq.AUTH_VALIDATION_ENDPOINT.path) == \ sq.endpoint_url(sq.AUTH_VALIDATION_ENDPOINT)