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

Flush unused methods and tests #845

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

Conversation

manumilou
Copy link
Contributor

Tackles #842

It turns out that add_item is not used, so the clients are always billed with the proper prices. It must have been part of a refactoring initiative that did not finish.

Changes proposed in this pull request:

🔥

  • Remove add_item, remove_item and cancel methods
  • Remove corresponding test cases. remove_item and cancel were not tested.

Status

  • READY
  • HOLD
  • WIP (Work-In-Progress)

Additional notes

I let you decide if you want to merge that or not. In my opinion, it's better to remove dead code, as it can lead to confusion.

total_quantity=1,
remark='no sugar')
response = self.client.get('/delivery/kitchen_count/')
self.assertTrue(b'Compote' in response.content)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the entire test, as this is the only assertion. That's a lot of setup for a single test.

@@ -39,35 +39,6 @@ def setUpTestData(cls):
"""
cls.order = OrderFactory(order_item=None)

def test_order_add_item_meal_component(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did not remove the entire test class, as it is reused later in this test file. But, effectively, there is no more test in this class.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.07%) to 95.28% when pulling 3cfcf29 on manumilou:remove-unused-methods into 0359baf on savoirfairelinux:dev.

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