Skip to content

#126-fix-tests for order_details - #154

Open
NikolayVaradinov wants to merge 6 commits into
developmentfrom
126-fix
Open

#126-fix-tests for order_details#154
NikolayVaradinov wants to merge 6 commits into
developmentfrom
126-fix

Conversation

@NikolayVaradinov

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread Carwash/order_details/tests/tests_od.py Outdated
self.assertTrue(OrderDetail.objects.get(price=10.5))
self.assertTrue(OrderDetail.objects.get(duration=15))
self.assertTrue(OrderDetail.objects.get(start_time=datetime.time(18, 0, 0)))
self.assertEqual(len(OrderDetail.objects.all()), 1)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

OrderDetail.objects.all().count()

Comment thread Carwash/order_details/tests/tests_od.py Outdated
duration=15,
start_time=datetime.time(18, 0, 0))

self.assertTrue(OrderDetail.objects.get(price=10.5))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
self.assertTrue(OrderDetail.objects.get(price=10.5))
self.assertTrue(OrderDetail.objects.filter(price=10.5).exists())

but in this test, you check creation factory, send request

@NikolayVaradinov NikolayVaradinov changed the title #126-fix #126-fix-tests for order_details Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants