-
Notifications
You must be signed in to change notification settings - Fork 0
Menu #16
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
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| self.menu = Menu.objects.create(chef=self.chef, title='foxy food', delivery=True ) | ||
| self.item = Item.objects.create(menu=self.menu, title="kibbles", size="the whole bowl", | ||
| price=13.33, description="food for foxy") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there should be one more line break here between setup and the first test!
| self.assertFalse(Menu.objects.filter(chef=self.chef).exists()) | ||
| menu = Menu.objects.create(chef=self.chef, title='foxy food', delivery=True ) | ||
| self.assertTrue(Menu.objects.filter(chef=self.chef).exists()) | ||
| self.assertFalse(Menu.objects.filter(title='foxys favorites').exists()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to really test this part. I would just start on line 28 with the "assertTrue" that the menu exists. That way you can use the menu from setup (self.menu) (you'll have to change it in all the other places you reference "menu" as well so don't forget that). This test is more about testing the link between menu and item then it is about testing the menu creation. Make sense? (maybe we should rename this test to test_menu_item_link?)
No description provided.