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

changing unit tests to account for defaults in redis flags #1499

Merged
merged 5 commits into from
Jul 15, 2021

Conversation

chayim
Copy link
Contributor

@chayim chayim commented Jun 28, 2021

Pull Request check-list

Please make sure to review and check all of these items:

  • Does $ tox pass with this change (including linting)?
  • Does travis tests pass with this change (enable it first in your forked repo and wait for the travis build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

Some versions of redis (validated against 6.2.4) set extra flags, making the tests fail.

Modified the tests to validate the specific flags pertaining to the test case are in place.

Similarly with acl_list, as other tests validate the specifics of acl_setuser, I changed it to validate against the acl list.

Finally, while here, I added python 3.9 to tox.

closes #1459
closes #1478

chayim and others added 4 commits June 28, 2021 16:34
Some versions of redis (validated against 6.2.4) set extra flags, making the tests fail.

Modified the tests to validate the specific flags pertaining to the test case are in place.

Similarly with acl_list, as other tests validate the specifics of acl_setuser, I changed it to validate against the acl list.

Finally, while here, I added python 3.9 to tox
Copy link
Contributor

@andymccurdy andymccurdy left a comment

Choose a reason for hiding this comment

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

lgtm

@chayim chayim merged commit cb97b9b into redis:master Jul 15, 2021
@chayim chayim deleted the testfixes branch July 15, 2021 05:57
@chayim chayim mentioned this pull request Jul 15, 2021
@mcepl
Copy link

mcepl commented Jul 16, 2021

Just a note: I am a big friend of the method dict.update() … you could keep the dict literal (which is more readable, IMHO) and yet not overwrite the defaults.

bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Jul 18, 2021
https://build.opensuse.org/request/show/906638
by user mcepl + dimstar_suse
- Add account-defaults-redis.patch which fixes failing tests by
  taking into consideration redis defaults, not overwriting them
  (gh#redis/redis-py#1499).
Andrew-Chen-Wang added a commit to aio-libs-abandoned/aioredis-py that referenced this pull request Oct 8, 2021
changing unit tests to account for defaults in redis flags redis/redis-py#1499

* This does not include the changes in tests/test_pubsub.py because we do not implement threading.

Signed-off-by: Andrew-Chen-Wang <acwangpython@gmail.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
3 participants