diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-08-27 17:24:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-27 17:24:46 -0400 |
commit | e00816ad98a1165b67238f9711cb1b0e7135f25f (patch) | |
tree | 3b0135e8c57b2b9082191088237298f7b50615f7 /tests/rest/client/v2_alpha | |
parent | Convert stats and related calls to async/await (#8192) (diff) | |
download | synapse-e00816ad98a1165b67238f9711cb1b0e7135f25f.tar.xz |
Do not yield on awaitables in tests. (#8193)
Diffstat (limited to 'tests/rest/client/v2_alpha')
-rw-r--r-- | tests/rest/client/v2_alpha/test_filter.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/rest/client/v2_alpha/test_filter.py b/tests/rest/client/v2_alpha/test_filter.py index e0e9e94fbf..de00350580 100644 --- a/tests/rest/client/v2_alpha/test_filter.py +++ b/tests/rest/client/v2_alpha/test_filter.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from twisted.internet import defer + from synapse.api.errors import Codes from synapse.rest.client.v2_alpha import filter @@ -73,8 +75,10 @@ class FilterTestCase(unittest.HomeserverTestCase): self.assertEquals(channel.json_body["errcode"], Codes.FORBIDDEN) def test_get_filter(self): - filter_id = self.filtering.add_user_filter( - user_localpart="apple", user_filter=self.EXAMPLE_FILTER + filter_id = defer.ensureDeferred( + self.filtering.add_user_filter( + user_localpart="apple", user_filter=self.EXAMPLE_FILTER + ) ) self.reactor.advance(1) filter_id = filter_id.result |