Consolidate basic API unit test setup and prepare for expansion options.

Review Request #13376 — Created Oct. 25, 2023 and submitted — Latest diff uploaded


Review Board


Our API unit test setup has grown over time in ways that made it hard to
build upon.

We had dedicated methods for the Local Site setup that took care of
fixture loading, authentication, subclass setup state, and some
assertions, but we didn't have this for non-Local Site tests, each of
which had to implement this setup manually, leading to inconsistencies.

The setup functions we did have used tuple results, which made them hard
to build upon. This is also an issue for the subclass's return values
(though changing that is out of scope for this work and isn't necessary
for upcoming changes).

This change moves the setup functions out of the Local Site mixins and
into the base test class mixins, giving them options for controlling
some more aspects of test setup to meet all the current needs. They also
now return dictionaries of information.

These changes make it easier to expand upon this for some upcoming work.

Unit tests pass.