Python twisted.protocols.basic 模块,NetstringReceiver() 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用twisted.protocols.basic.NetstringReceiver()

项目:zenchmarks    作者:squeaky-pl    | 项目源码 | 文件源码
def test_stringReceivedNotImplemented(self):
        """
        When L{NetstringReceiver.stringReceived} is not overridden in a
        subclass, calling it raises C{NotImplementedError}.
        """
        proto = basic.NetstringReceiver()
        self.assertRaises(NotImplementedError, proto.stringReceived, 'foo')