Add test for org auth token last used date always being updated
[It] would be good to have a test for this to prevent regressions in the future.
Originally posted by @markstory in https://github.com/getsentry/sentry/pull/67147#pullrequestreview-1943581861
Hey @markstory, I was wondering if you have any pointers for how to write this test. I had asked on the PR where you requested the test, but maybe you missed that comment since the PR was closed shortly afterwards.
I did miss that comment sorry. I generally skip over reading updates on closed pull requests. As for writing a test, we have a few tests for the release endpoints. These endpoints include explicit calls to update_org_auth_token_last_used. An example of an existing test is https://github.com/getsentry/sentry/blob/ee63085600c34fd4c33b1b9d7983456add3acf42/tests/sentry/api/endpoints/test_organization_releases.py#L1888-L1892
We could have similar tests for a non-release endpoint + orgauth token request.