{"action":"created","issue":{"url":"https://api.github.com/repos/uber/tchannel-python/issues/287","labels_url":"https://api.github.com/repos/uber/tchannel-python/issues/287/labels{/name}","comments_url":"https://api.github.com/repos/uber/tchannel-python/issues/287/comments","events_url":"https://api.github.com/repos/uber/tchannel-python/issues/287/events","html_url":"https://github.com/uber/tchannel-python/pull/287","id":114710940,"number":287,"title":"Separate handler for call req and call req continue message.","user":{"login":"junchaowu","id":3731781,"avatar_url":"https://avatars.githubusercontent.com/u/3731781?v=3","gravatar_id":"","url":"https://api.github.com/users/junchaowu","html_url":"https://github.com/junchaowu","followers_url":"https://api.github.com/users/junchaowu/followers","following_url":"https://api.github.com/users/junchaowu/following{/other_user}","gists_url":"https://api.github.com/users/junchaowu/gists{/gist_id}","starred_url":"https://api.github.com/users/junchaowu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junchaowu/subscriptions","organizations_url":"https://api.github.com/users/junchaowu/orgs","repos_url":"https://api.github.com/users/junchaowu/repos","events_url":"https://api.github.com/users/junchaowu/events{/privacy}","received_events_url":"https://api.github.com/users/junchaowu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-02T23:47:33Z","updated_at":"2015-11-03T01:36:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/uber/tchannel-python/pulls/287","html_url":"https://github.com/uber/tchannel-python/pull/287","diff_url":"https://github.com/uber/tchannel-python/pull/287.diff","patch_url":"https://github.com/uber/tchannel-python/pull/287.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/uber/tchannel-python/issues/comments/153212372","html_url":"https://github.com/uber/tchannel-python/pull/287#issuecomment-153212372","issue_url":"https://api.github.com/repos/uber/tchannel-python/issues/287","id":153212372,"user":{"login":"abhinav","id":41730,"avatar_url":"https://avatars.githubusercontent.com/u/41730?v=3","gravatar_id":"","url":"https://api.github.com/users/abhinav","html_url":"https://github.com/abhinav","followers_url":"https://api.github.com/users/abhinav/followers","following_url":"https://api.github.com/users/abhinav/following{/other_user}","gists_url":"https://api.github.com/users/abhinav/gists{/gist_id}","starred_url":"https://api.github.com/users/abhinav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhinav/subscriptions","organizations_url":"https://api.github.com/users/abhinav/orgs","repos_url":"https://api.github.com/users/abhinav/repos","events_url":"https://api.github.com/users/abhinav/events{/privacy}","received_events_url":"https://api.github.com/users/abhinav/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T01:36:20Z","updated_at":"2015-11-03T01:36:20Z","body":"Those tests feel like they're just rewriting the code that you just wrote. They assert things about internal details of the class that the caller shouldn't care about. The behavior of the class isn't actually verified. These tests will just be invalidated if there's any refactoring done to the class' internals.\r\n\r\nPlease  test the behavior from the caller's point of view without mocking and asserting \"this internal method was called\"? The caller doesn't care about whether `handle_call_req` was called or whether it even exists. That's a detail internal to the class. That's not part of the contract of the class. Only test and verify the public interface of the class.\r\n\r\nNote that you didn't have to change anything else but the `handle` method to do this refactor. So, it's a red flag if your tests depend on things added by the refactor. Your tests here should depend only on `handle`, its arguments, and what it returns."}}