summary refs log tree commit diff
path: root/tests/rest/client/test_transactions.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add missing type hints in tests (#14879)Patrick Cloke2023-01-261-14/+28
| | | | * FIx-up type hints in tests.logging. * Add missing type hints to test_transactions.
* Prefer `make_awaitable` over `defer.succeed` in tests (#12505)Sean Quah2022-04-271-3/+4
| | | | | | | | | | | When configuring the return values of mocks, prefer awaitables from `make_awaitable` over `defer.succeed`. `Deferred`s are only awaitable once, so it is inappropriate for a mock to return the same `Deferred` multiple times. Also update `run_in_background` to support functions that return arbitrary awaitables. Signed-off-by: Sean Quah <seanq@element.io>
* Add type hints to `tests/rest`. (#12208)Dirk Klimpel2022-03-111-2/+17
| | | Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* Use mock from the stdlib. (#9772)Patrick Cloke2021-04-091-1/+1
|
* Clean up some LoggingContext stuff (#7120)Richard van der Hoff2020-03-241-8/+8
| | | | | | | | | | | | | | | | | | | | | | | * Pull Sentinel out of LoggingContext ... and drop a few unnecessary references to it * Factor out LoggingContext.current_context move `current_context` and `set_context` out to top-level functions. Mostly this means that I can more easily trace what's actually referring to LoggingContext, but I think it's generally neater. * move copy-to-parent into `stop` this really just makes `start` and `stop` more symetric. It also means that it behaves correctly if you manually `set_log_context` rather than using the context manager. * Replace `LoggingContext.alive` with `finished` Turn `alive` into `finished` and make it a bit better defined.
* Replace returnValue with return (#5736)Amber Brown2019-07-231-1/+1
|
* Move logging utilities out of the side drawer of util/ and into logging/ (#5606)Amber Brown2019-07-041-1/+1
|
* Run black.black2018-08-101-23/+7
|
* Test fixes for Python 3 (#3647)Amber Brown2018-08-091-2/+2
|
* Make auth & transactions more testable (#3499)Amber Brown2018-07-141-1/+4
|
* run isortAmber Brown2018-07-091-3/+4
|
* Pass around the reactor explicitly (#3385)Amber Brown2018-06-221-3/+3
|
* Fix logcontext leak in HttpTransactionCacheRichard van der Hoff2018-05-211-0/+21
| | | | ONE DAY I WILL PURGE THE WORLD OF THIS EVIL
* Stop the transaction cache caching failuresRichard van der Hoff2018-05-211-0/+54
| | | | | | The transaction cache has some code which tries to stop it caching failures, but if the callback function failed straight away, then things would happen backwards and we'd end up with the failure stuck in the cache.
* Clean transactions based on time. Add HttpTransactionCache tests.Kegan Dougal2016-11-141-0/+69