Edgewall Software

Changes between Initial Version and Version 1 of Ticket #12211, comment 30


Ignore:
Timestamp:
Jun 14, 2018, 3:15:03 AM (6 years ago)
Author:
Ryan J Ollos

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12211, comment 30

    initial v1  
    1 If I was implementing `MockRequest` now, I would have added a property `response_sent` that returned the value from the buffer, to avoid accessing as `req.response_sent.getvalue()`. Like what is done here: [browser:trunk/trac/web/tests/api.py@16656:106-108#L88].
     1If I was implementing `MockRequest` now, I would have add a property `response_sent` that returned the value from the buffer, to avoid accessing as `req.response_sent.getvalue()`. See for example what is done here: [browser:trunk/trac/web/tests/api.py@16656:106-108#L88]. However, `Request.response_sent` is an attribute and changing it to a property would be an API change.
     2
     3I suppose we could added an accessor such as `get_response()`, but I tend to think it confuses more than helps to have multiple public attributes and functions for accessing the same data.