示例#1
0
def test_message_preprocessor_not_coroutine_typeerror(preprocess):
    """Test TypeError is raised if preprocessor isn't a coroutine."""
    app = Application('testing')
    with pytest.raises(TypeError):
        app.message_preprocessor(preprocess)
示例#2
0
def test_message_preprocessor_not_coroutine_typeerror(preprocess, ASYNC_QUEUE):
    """Test TypeError is raised if preprocessor isn't a coroutine."""
    app = Application('testing', settings={'ASYNC_QUEUE': ASYNC_QUEUE})
    with pytest.raises(TypeError):
        app.message_preprocessor(preprocess)