-
Notifications
You must be signed in to change notification settings - Fork 7
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
Change users models #66
Change users models #66
Conversation
Django default user already has email, first_name, last_name. I removed those 3 fields from our User and created a static method that will create our user with all required fields. Also included some tests - from now on we must write tests for each PR
I saw that django generates in the DB _id for each field that is foreign key. Better to remove it now.
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.
Can you remove the dummy test? we don't need it anymore since there are real tests now.
As for the test and functions: |
I don't want that PR to be big. Any other ideas you have to add more functionality open an issue about it |
- Change tests to pytest - Removed dummy test - Create factory for tests
On admin panel first_name no longer exists so it failed. Changed it to take the username from auth user.
Why |
- removed conftest.py - added tests in classes - changed models realated_name
2556f41
you are right - I removed it |
removed email from test_create_user_without_email added long name to test_create_user_with_long_name
- Fix merge between redhat-beyond#66 and redhat-beyond#72
- Fix merge between redhat-beyond#66 and redhat-beyond#72
* Fix merge between PRs - Fix merge between #66 and #72 * Create conftest.py - Create conftest.py for reusable fixtures * Add change_assignee function - Add change_assignee function to Task model. - Add tests for change_assignee * Refactor conftest.py - Removed use of Random to prevent unexpected behavior in tests. - Changed to named parameters in user creations. * Handle special cases - Add new tests to validate the correctness of the function in special cases. * Fix flake8 error * Update change_assignee - Add new user case handling: new_assignee is a user but not part of the system (not in DB) - Add corresponding test * Refactor conftest.py * Refactor conftest.py * Refactor test_change_assignee.py
Fixes #61
Django default user already has email, first_name, last_name.
I removed those 3 fields from our User and .
Changes you made
from now on we must write tests for each PR