You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.2 KiB

8 months ago
  1. Index: python-pyamf-0.8.11~git2fe5a4a52c4c/pyamf/tests/gateway/test_twisted.py
  2. ===================================================================
  3. --- python-pyamf-0.8.11~git2fe5a4a52c4c.orig/pyamf/tests/gateway/test_twisted.py
  4. +++ python-pyamf-0.8.11~git2fe5a4a52c4c/pyamf/tests/gateway/test_twisted.py
  5. @@ -31,21 +31,22 @@ from pyamf.remoting import gateway
  6. from pyamf.flex import messaging
  7. -@implementer(IBodyProducer)
  8. -class BytesProducer(object):
  9. - def __init__(self, body):
  10. - self.body = body
  11. - self.length = len(body)
  12. -
  13. - def startProducing(self, consumer):
  14. - consumer.write(self.body)
  15. - return succeed(None)
  16. +if twisted:
  17. + @implementer(IBodyProducer)
  18. + class BytesProducer(object):
  19. + def __init__(self, body):
  20. + self.body = body
  21. + self.length = len(body)
  22. +
  23. + def startProducing(self, consumer):
  24. + consumer.write(self.body)
  25. + return succeed(None)
  26. - def pauseProducing(self):
  27. - pass
  28. + def pauseProducing(self):
  29. + pass
  30. - def stopProducing(self):
  31. - pass
  32. + def stopProducing(self):
  33. + pass
  34. class TestService(object):