我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用twisted.protocols.basic.NetstringReceiver()。
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')