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

Return True in is_tax_known() when the basket is empty #4166

Merged
merged 4 commits into from
Sep 17, 2023

Conversation

TopDevPros
Copy link
Contributor

Added fix to is_tax_known() in oscar.apps.basket.abstract_models.AbstractBasket and a test to verify it works with an empty basket.

Also, modified the 2 tests in tests.integration.order.TestShippingOfferForOrder which relied on is_tax_known() incorrectly returning True when the basket was empty.

Replaces PR 4140

@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Merging #4166 (738af89) into master (2cc14b9) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4166   +/-   ##
=======================================
  Coverage   87.50%   87.50%           
=======================================
  Files         290      290           
  Lines       15912    15912           
=======================================
  Hits        13924    13924           
  Misses       1988     1988           
Files Changed Coverage Δ
src/oscar/apps/basket/abstract_models.py 92.35% <100.00%> (ø)

@viggo-devries viggo-devries changed the title Fix AbstractBasket's is_tax_known() when the basket is empty Fix AbstractBasket's is_tax_known() when the basket is empty return True Sep 17, 2023
@viggo-devries viggo-devries changed the title Fix AbstractBasket's is_tax_known() when the basket is empty return True Return True in is_tax_known() when the basket is empty Sep 17, 2023
Copy link
Contributor

@viggo-devries viggo-devries left a comment

Choose a reason for hiding this comment

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

Looks good to me,

@viggo-devries viggo-devries merged commit 39e7c8d into django-oscar:master Sep 17, 2023
23 checks passed
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

2 participants