Skip to content

Consolidating return types #7

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

Closed
wants to merge 3 commits into from
Closed

Conversation

denismakogon
Copy link
Member

Closes: #6
Closes: #4

Closes: #6
Closes: #4
Signed-off-by: Denis Makogon <denys.makogon@oracle.com>
@denismakogon denismakogon force-pushed the 0.2-force-improvements branch from 30ec126 to 043236b Compare December 10, 2018 18:15
Signed-off-by: Denis Makogon <denys.makogon@oracle.com>
 - this method validates whether a converter can process the event,
   in case of structured converter this method does nothing,
   in case of binary converter this method raise an exception if an event is not v0.2
 - adding (un)marshaller validation on being a callable object
 - tests added

Signed-off-by: Denis Makogon <denys.makogon@oracle.com>
@@ -25,6 +25,13 @@ class BinaryHTTPCloudEventConverter(base.Converter):
TYPE = "binary"
SUPPORTED_VERSIONS = [v02.Event, ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

evankanderson added a commit to evankanderson/sdk-python that referenced this pull request Jan 13, 2019
Signed-off-by: Evan Anderson <argent@google.com>

content_type = headers.get(
"content-type", headers.get("Content-Type"))

for _, cnvrtr in self.__converters.items():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is treating self.__converters as an unordered list (despite having been passed as an ordered list on line 102. dict randomization will mean that binary mode will sometimes be selected for a structured-mode request, which will cause test flakiness. (Discovered this by accident when re-running tests after fixing a lint error.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I fixed this in #9)

evankanderson added a commit to evankanderson/sdk-python that referenced this pull request Jan 13, 2019
Signed-off-by: Evan Anderson <argent@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants