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

Adding Choice model and votes #85

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

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

posts/tests.py Outdated Show resolved Hide resolved
posts/tests.py Outdated Show resolved Hide resolved
posts/tests.py Outdated Show resolved Hide resolved
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