Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove surface command #119

Closed
perrygeo opened this issue May 25, 2018 · 1 comment · Fixed by #120
Closed

Remove surface command #119

perrygeo opened this issue May 25, 2018 · 1 comment · Fixed by #120
Milestone

Comments

@perrygeo
Copy link
Contributor

Surface tests are failing. Worth considering if we should bother fixing this as the API is deprecated and slated to be removed soon anyways.

What you've tried already

pytest tests/test_surface.py

Expected outcome

tests pass

Actual outcome

The URL expected by the responses mock is something like

https://api.mapbox.com/v4/surface/mapbox.mapbox-terrain-v1.json?access_token=bogus
&layer=contour&fields=ele&geojson=true&interpolate=true&zoom=14
&points=-112.084004%2C36.05322%3B-112.083914%2C36.053573%3B-112.083965%2C36.053845

but the URL constructed by the SDK is slightly different in order and rounding of coordinates:

https://api.mapbox.com/v4/surface/mapbox.mapbox-terrain-v1.json?access_token=bogus
&points=-112.084004%2C36.053220%3B-112.083914%2C36.053573%3B-112.083965%2C36.053845
&geojson=true&fields=ele&layer=contour&zoom=14&interpolate=true

Resuling in this test failure

>       assert result.exit_code == 0
E       AssertionError: assert -1 == 0
E        +  where -1 = <Result ConnectionError('Connection refused: GET https://api.mapbox.com/v4/surface/mapbox.mapbox-terrain-v1.json?acces...son=true&interpolate=true&zoom=14&points=-112.084004%2C36.05322%3B-112.083914%2C36.053573%3B-112.083965%2C36.053845',)>.exit_code

Other information

  • Version numbers for mapboxcli and mapbox: 0.7 and 0.16 respectively
  • Operating System : OSX
  • Python version number : 3.6.3
  • How did you install the mapbox cli? : pip install -e . from master
@perrygeo
Copy link
Contributor Author

Given that the Surface API is deprecated, we should avoid putting any effort into these tests and instead remove mapbox surface in the next release.

Changing title to reflect the new scope.

@perrygeo perrygeo changed the title Surface API tests: response mocks are too sensitive to minor URL changes Remove surface command May 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant