Open alessandrofelder opened 3 years ago
FYI @alessandrofelder http://open-notify.org/Open-Notify-API/ISS-Pass-Times/ > "This api has been removed."
Therefore, print(iss_passes(51.5074, -0.1278)) # ISS passes over London
results in
python times.py
[]
Maybe exercise require to be refactored with http://open-notify.org/Open-Notify-API/ISS-Location-Now/
Mocking a web service
There's a web service that gives you the times of when the ISS is visible from your location
Using this web service, write a function named
iss_passes
intimes.py
that generates a similar output thantime_range
.http://api.open-notify.org/iss-pass.json?lat=29.55&lon=95.1&n=5
(Documentation)datetime.datetime.fromtimestamp
function.Write a test for the
iss_passes
function that mocks the request call and the response to avoid querying the website all the time we run the tests.Commit, push and link to this issue.
A sample solution can be found here.