Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Story Points:2
-
Sprint:TSSW Sprint - Oct 10 - Oct 24
-
Team:Telescope and Site
-
Urgent?:No
Description
The ts_authorize code can be improved in several ways:
- Use the dataclasses of testutils in the rest of the code.
- Return dicts instead of setting instance variables (see https://github.com/lsst-ts/ts_authorize/pull/12#discussion_r988432503)
- Extract the aiohttp WebServer code from the test classes such that it can be reused by them.
- Resolve the TODOs
The use of the dataclasses proved not simple because of two reasons:
The first point I was able to resolve by separating the authorize request data and the validation data. I had to introduce a new dataclass for that. The second point would lead to more clutter in the code so I decided to keep things the way they are now.