def test_build_correct_url(self, mock_request_params): canonical_url = 'http://127.0.0.1:8081/function?app=999' mock_request_params['path'] = '/function' rqst = Request(**mock_request_params) assert str(rqst._build_url()) == canonical_url mock_request_params['path'] = 'function' rqst = Request(**mock_request_params) assert str(rqst._build_url()) == canonical_url
def test_build_correct_url(mock_request_params): canonical_url = 'http://127.0.0.1:8081/function?app=999' mock_request_params['path'] = '/function' rqst = Request(**mock_request_params) assert str(rqst._build_url()) == canonical_url mock_request_params['path'] = 'function' rqst = Request(**mock_request_params) assert str(rqst._build_url()) == canonical_url
def test_build_correct_url(mock_request_params): config = get_config() canonical_url = str(config.endpoint).rstrip('/') + '/function?app=999' mock_request_params['path'] = '/function' rqst = Request(**mock_request_params) assert str(rqst._build_url()) == canonical_url mock_request_params['path'] = 'function' rqst = Request(**mock_request_params) assert str(rqst._build_url()) == canonical_url