diff options
author | 2020-02-23 13:05:10 +0100 | |
---|---|---|
committer | 2020-02-23 21:00:48 +0100 | |
commit | 135d6daa4804574935cd788c5baec656765f484b (patch) | |
tree | c5e6b73dcce43f893b7bc4955d1fecc42933ba20 /tests/test_helpers.py | |
parent | Use mixin-composition not inheritance for LoggingTestCase (diff) |
Use IsolatedAsyncioTestCase instead of async_test
Since we upgraded to Python 3.8, we can now use the new IsolatedAsyncioTestCase test class to use coroutine-based test methods instead of our own, custom async_test decorator. I have changed the base class for all of our test classes that use coroutine-based test methods and removed the now obsolete decorator from our helpers.
Diffstat (limited to 'tests/test_helpers.py')
-rw-r--r-- | tests/test_helpers.py | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/tests/test_helpers.py b/tests/test_helpers.py index 7894e104a..fe39df308 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -395,11 +395,3 @@ class MockObjectTests(unittest.TestCase): coroutine = async_mock() self.assertTrue(inspect.iscoroutine(coroutine)) self.assertIsNotNone(asyncio.run(coroutine)) - - def test_async_test_decorator_allows_synchronous_call_to_async_def(self): - """Test if the `async_test` decorator allows an `async def` to be called synchronously.""" - @helpers.async_test - async def kosayoda(): - return "return value" - - self.assertEqual(kosayoda(), "return value") |