<!-- migrator:start --> *This issue was originally created by [**@<!-- -->ShadowJonathan**](https://github.com/ShadowJonathan) at <https://github.com/matrix-org/sydent/issues/315>.* <!-- migrator:end --> Apply the same fix from https://github.com/matrix-org/synapse/pull/8335 onto the following lines: https://github.com/matrix-org/sydent/blob/66abd5b6808cd9e15e62e88000ec7e5afc287d56/tests/utils.py#L234-L245