New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a test of metadata, status code, and details #6955
Add a test of metadata, status code, and details #6955
Conversation
1ac4fee
to
9531e58
Compare
I don't see a problem with the way |
9531e58
to
bde81c7
Compare
|
||
def __init__(self, channel): | ||
unary_unary = channel.unary_unary( | ||
b''.join((b'/', _SERVICE, b'/', _UNARY_UNARY,)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b'/'.join(b'', _SERVICE , _UNARY_UNARY)
seems to accomplish this a bit more eloquently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed; done.
bde81c7
to
5050c9b
Compare
(The content of this pull request has now also undergone a |
5050c9b
to
b16e451
Compare
Lgtm |
To clarify, because I've become a bit unfamiliar with the Python API: where in the tests are error details being set by the server, and where are they read by the client? (Maybe we can add a comment?) |
@jcanizales: the code is set in a call to |
Oh! You're talking "details" as in "error message". The original issue was about extra error details that would be transmitted as protos, serialized in the server and parsed by the client, for programmatic handling. Sorry that that wasn't clear. |
Fixes issue 4545.
Please pay particular attention to the way
.decode('utf-8')
is used on strings; please feel free to say "oh no I see what you're going for but the better way is<...>
".