问题描述
我正在按照教程为我的应用程序编写 Pytest 但不推荐直接构造函数,请使用 Function.from_parent。
@pytest.mark.asyncio
class TestWebSocket:
async def test_can_connect_to_server(self,settings):
settings.CHANNEL_LAYERS = TEST_CHANNEL_LAYERS
communicator = WebsocketCommunicator(
application=application,path='/pizza/'
)
connected,_ = await communicator.connect()
assert connected is True
await communicator.disconnect()
我该如何解决这个问题?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)