BIND 10 #216: Xfrin: Implement the feature items in TODO file.
BIND 10 Development
do-not-reply at isc.org
Mon Nov 1 04:33:59 UTC 2010
#216: Xfrin: Implement the feature items in TODO file.
------------------------------+---------------------------------------------
Reporter: zhanglikun | Owner: shentingting
Type: enhancement | Status: reviewing
Priority: major | Milestone: y2 6 month milestone
Component: xfrin | Resolution:
Keywords: | Sensitive: 0
Estimatedhours: 0.0 | Hours: 0
Billable: 1 | Totalhours: 5.0
Internal: 0 |
------------------------------+---------------------------------------------
Changes (by jinmei):
* owner: jinmei => shentingting
Comment:
Replying to [comment:41 shentingting]:
> > I also noticed these methods are not tested yet. As we discussed
before earlier in this ticket. Please add tests for these methods.
> >
> For send()/recv()/close(), I remove some exceptions that It can not
happen. For the rest exception, I do not know how to test them. In
xfrin_test, I mode these function to test other function. so Do you have
any suggestion for this tests?
>
Can't we use !MockSocket?
BTW, I've noticed a possible typo:
{{{
def test_send_data_nodate(self):
}}}
I suspect should be "test_send_data_nodata".
On a related note, I don't think "mock_send" is a good name:
{{{
def mock_send(self, data):
return 0
[...]
self.conn.send = self.conn.mock_send
}}}
because this method is (seeminly) intended to send some unexpected result.
Suggestions:
- I'd use a more specific name to make the intent clear, e.g.,
mock_send_nodata.
- I'd also describe the intent of this test in comments. It's not very
clear just from the test code (you'll at least have to chec mock_send()).
--
Ticket URL: <http://bind10.isc.org/ticket/216#comment:42>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list