Skip to content
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 validation to put_events #3579

Merged
merged 3 commits into from
Jan 11, 2021

Conversation

gruebel
Copy link
Contributor

@gruebel gruebel commented Jan 3, 2021

Fixes #3384

It is a quite interesting behaviour of the put_events endpoint, because each event is validated separately and the status is send back for all of them.

@coveralls
Copy link

coveralls commented Jan 8, 2021

Coverage Status

Coverage increased (+0.01%) to 94.574% when pulling 347fb43 on gruebel:add-put-events-validation into a31599d on spulec:master.

Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

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

Hey @gruebel, would you mind splitting up the test scenarios in multiple methods?
Would be good to also test a scenario with multiple events, some valid, some invalid.

@gruebel
Copy link
Contributor Author

gruebel commented Jan 9, 2021

I also removed the weird test_rule_tagging_sad test and added the correct way of testing them.

Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

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

Looks like it's failing in Py2:
AttributeError: 'module' object has no attribute 'JSONDecodeError'

@gruebel
Copy link
Contributor Author

gruebel commented Jan 10, 2021

@bblommers is there actually a plan to drop Python 2 support at some point?

@bblommers
Copy link
Collaborator

There's no plan yet, @gruebel. There's still a significant portion of people that are stuck with Py2, and we want to keep Moto available to them as long as possible.
Thanks for the PR!

@bblommers bblommers merged commit 17d94f9 into getmoto:master Jan 11, 2021
@gruebel gruebel deleted the add-put-events-validation branch February 1, 2021 15:06
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.

Add request validation to EventBridge
3 participants