summary refs log tree commit diff
path: root/tests/test_utils/__init__.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Create a constant for a small png image in tests. (#10834)Patrick Cloke2021-09-161-2/+12
| | | To avoid duplicating it between a few tests.
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Use mock from the stdlib. (#9772)Patrick Cloke2021-04-091-2/+1
|
* Preparatory refactoring of the SamlHandlerTestCase (#8938)Richard van der Hoff2020-12-151-0/+12
| | | | | | | | | | | | | * move simple_async_mock to test_utils ... so that it can be re-used * Remove references to `SamlHandler._map_saml_response_to_user` from tests This method is going away, so we can no longer use it as a test point. Instead, factor out a higher-level method which takes a SAML object, and verify correct behaviour by mocking out `AuthHandler.complete_sso_login`. * changelog
* Factor out FakeResponse from test_oidcRichard van der Hoff2020-12-021-0/+27
|
* Fail test cases if they fail to await all awaitables (#8690)Patrick Cloke2020-10-301-1/+33
|
* Allow for make_awaitable's return value to be re-used. (#8261)Patrick Cloke2020-09-081-3/+10
|
* Convert state resolution to async/await (#7942)Patrick Cloke2020-07-241-1/+6
|
* Fix limit logic for EventsStream (#7358)Richard van der Hoff2020-04-291-0/+20
| | | | | | | | | | | | | | | | | | | * Factor out functions for injecting events into database I want to add some more flexibility to the tools for injecting events into the database, and I don't want to clutter up HomeserverTestCase with them, so let's factor them out to a new file. * Rework TestReplicationDataHandler This wasn't very easy to work with: the mock wrapping was largely superfluous, and it's useful to be able to inspect the received rows, and clear out the received list. * Fix AssertionErrors being thrown by EventsStream Part of the problem was that there was an off-by-one error in the assertion, but also the limit logic was too simple. Fix it all up and add some tests.
* Enable configuring test log level via env var (#4506)Richard van der Hoff2019-01-291-0/+18
I got fed up with always adding '@unittest.DEBUG' every time I needed to debug a test.