libcloud
libcloud copied to clipboard
Only call super() during MockHttp if required
Only instantiate superclasses of MockHttp if we are provided keyword arguments
Description
With pytest 8.2 and above, any class that contains classes is collected, which means they are instantiated, which MockHttp's superclasses do not accept, since they require keyword arguments. To work around this, only call the superclass's init method if we are passed kwargs.
Status
Done, ready for review
Checklist (tick everything that applies)
- [x] Code linting (required, can be done after the PR checks)
- [x] Documentation (as code comments)
- [x] Tests
- [ ] ICLA (required for bigger changes)