Consolidate basic API unit test setup and prepare for expansion options.
Review Request #13376 — Created Oct. 25, 2023 and submitted
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.
Summary | ID |
---|---|
d55578c6e4b7508e203768c54ad8a344dbd1d54b |
Description | From | Last Updated |
---|---|---|
local variable 'user' is assigned to but never used Column: 9 Error code: F841 |
reviewbot | |
local variable 'user' is assigned to but never used Column: 9 Error code: F841 |
reviewbot | |
local variable 'user' is assigned to but never used Column: 9 Error code: F841 |
reviewbot | |
local variable 'user' is assigned to but never used Column: 9 Error code: F841 |
reviewbot | |
local variable 'user' is assigned to but never used Column: 9 Error code: F841 |
reviewbot |
- Change Summary:
-
Removed unused variables.
- Commits:
-
Summary ID d496bb2b771f2cf00851caa75e2b7dd0e8d0a867 7fc7ad41cd8b3c720c0a32aa5d52cc611a2e36a3
Checks run (2 succeeded)
- Change Summary:
-
Renamed the setup state methods to be public for other tests to use, and to help differentiate the name from the per-suite setup functions.
- Commits:
-
Summary ID 7fc7ad41cd8b3c720c0a32aa5d52cc611a2e36a3 d55578c6e4b7508e203768c54ad8a344dbd1d54b