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 a test for _update_throttling #270

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AlaaNour94
Copy link

@AlaaNour94 AlaaNour94 commented Jan 9, 2023

  • Append email send time to recent_send_times before checking the rate limit

  • Add test case for _update_throttling

Copy link
Contributor

@pcraciunoiu pcraciunoiu left a comment

Choose a reason for hiding this comment

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

Thanks for contributing and adding tests! Just a couple of notes.

@@ -38,6 +38,7 @@ django = ">=2.2"
importlib-metadata = {version = ">=1", python = "<3.8"}
cryptography = {version = ">=36.0.2", optional = true}
requests = {version = ">=2.27.1", optional = true}
freezegun = "^1.2.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be a dev dependency, it's only used for tests.

@@ -227,6 +227,7 @@ def _update_throttling(self):
# Since I'm not sure how Amazon determines at exactly what
# point to throttle, better be safe than sorry and let in, say,
# half of the allowed rate.
recent_send_times.append(now)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the comment on line 211 still valid with this change?

What did you use this for?

@GitRon
Copy link
Contributor

GitRon commented Nov 22, 2023

@AlaaNour94 Did you see the reply from @pcraciunoiu?

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.

None yet

3 participants