-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Add tests for the live tracking API endpoints #2305
Conversation
I fixed the CI error by sticking to ubuntu 18.04 for now. What about merging that and create a separate issue to update to ubuntu latest ? |
e16c2bf
to
34ceca6
Compare
with patch("skylines.model.tracking.datetime") as datetime_mock: | ||
datetime_mock.utcnow.return_value = utcnow | ||
|
||
res = client.get("/tracking/latest.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking at this I was wondering if any of our code was actually using this API endpoint at all and I couldn't find anything. might be worth it to just remove it instead of keeping it alive 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Turbo87 I am not exactly sure what you mean here ?
If by "my code" you mean flyxc then I am not using it as of now, that's right.
However I think @indyflyersoft is using it.
Did I get your question correctly ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what I meant was that the endpoint is not used in the skylines frontend code itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OOps "our code" I read too fast. Thanks for the clarification.
Might be worth checking the server logs to see how often it is used.
I think it's handy to have it.
For example flyxc could request the pilot's positions (/live/<user_ids>
) only if they are listed here.
And on the other hand there is no real reason to remove this.
Just my 2 cents. I don't have strong opinions on whether keeping/dropping this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great, thanks
Hey @Turbo87,
in order to prepare for the changes related to #2277 I have first added unit tests to test the current behavior.
Could you please review ?
Thanks