Skip to content

Adding Choice model and votes#85

Open
OmerCS8 wants to merge 1 commit intoredhat-beyond:mainfrom
OmerCS8:choise-vote
Open

Adding Choice model and votes#85
OmerCS8 wants to merge 1 commit intoredhat-beyond:mainfrom
OmerCS8:choise-vote

Conversation

@OmerCS8
Copy link
Collaborator

@OmerCS8 OmerCS8 commented Apr 11, 2022

  • Adding a Choice model that stores choice options of a poll and votes
  • Adding tests

Adding migrations

fix #53
Dependant on #52

Copy link
Collaborator

@TomerNewmanPrograms TomerNewmanPrograms left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@yulisuliman yulisuliman left a comment

Choose a reason for hiding this comment

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

I think you can delete @ pytest.mark.django_db () above the function in lines:
331, 337, 348, 356 ,364

yulisuliman
yulisuliman previously approved these changes Apr 21, 2022
- Adding a Choice model that stores choice options of a poll and votes
- Adding tests
@@ -0,0 +1,514 @@
import pytest
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe we moved the tests out from posts to Resume/tests/posts_tests.py

Comment on lines +343 to +345
def test_pollFile_invalid_args(self, poll, choice_text, expected_error):
with pytest.raises(expected_error):
PollFile(poll=poll, file=choice_text)
Copy link
Contributor

@abiton1 abiton1 May 15, 2022

Choose a reason for hiding this comment

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

Why do we try to create PollFile?
Shouldn't we try to create Choice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding Choice model and Votes to polls

4 participants