-
Notifications
You must be signed in to change notification settings - Fork 54
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
Unit tests of Account and User models #40
Conversation
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.
Simply precise.
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.
Please normalize adding comments. For example why use assertEqual, hard coding passwords and email. I am very sure someone is asking also about this.
I'll comment next time, asssertEqual() just verifies if the strings returned by the model class user and account are equal to what you have given to the database using __.save() |
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.
All good
What if we had all our tests in one place insteadvof having them on idividual apps? |
* Substituting the User Model (#34) * creating accounts app for the user model * creating user model * creating accounts model * registering account model to the admin * commenting code * changing the account model from the blog app to account app * model registering * add blog app to the installed apps in the settings file * adding max_length to email field * Update README.md Read me update * Unit tests of Account and User models (#40) Co-authored-by: madbunny <madbunny@madbunny.madbunny> * update README (#42) * Update README.md * Update README.md * changes on the admin page for users * update on the comments on the admin * Create contributions.md * Update phone number field to use international format * Update README.md file to have PhoneNumber field settings * updated phone number field to allow localizatuion option * Add Phone number module modified: README.md modified: requirements.txt * Transfer all tests to a tests module (#48) * blog post model * was inplementing post apis * fixing merge conflict * removed unused imports from the models files * minor tweak to the views retun msg * created test folder * Add unittests for user model (#41) * Substituting the User Model (#34) * creating accounts app for the user model * creating user model * creating accounts model * registering account model to the admin * commenting code * changing the account model from the blog app to account app * model registering * add blog app to the installed apps in the settings file * adding max_length to email field * add user testclass from testcase Co-authored-by: Hellen Wainaina <58620060+hellen-22@users.noreply.github.com> Co-authored-by: Hellen Wainaina <hellenwain@gmail.com> Co-authored-by: Kipkoech Sang <sangkipkoech@gmail.com> * add test folder in the Project i.e CMS folder and delete test.py files in the apps (#44) * Substituting the User Model (#34) * creating accounts app for the user model * creating user model * creating accounts model * registering account model to the admin * commenting code * changing the account model from the blog app to account app * model registering * add blog app to the installed apps in the settings file * adding max_length to email field * add user testclass from testcase * add test folder in project i.e CMS and modify installed files list * rename folders to ^test Co-authored-by: Hellen Wainaina <58620060+hellen-22@users.noreply.github.com> Co-authored-by: Hellen Wainaina <hellenwain@gmail.com> Co-authored-by: Kipkoech Sang <sangkipkoech@gmail.com> Co-authored-by: victorazangu <victorsazangu@gmail.com> Co-authored-by: Jimmy Oty <jimmytron17@gmail.com> Co-authored-by: Jimmy Tron <oduorjames@hotmail.com> Co-authored-by: Wamúyú <rutheve.eva@gmail.com> Co-authored-by: Hellen Wainaina <58620060+hellen-22@users.noreply.github.com> Co-authored-by: Hellen Wainaina <hellenwain@gmail.com> Co-authored-by: Kipkoech Sang <sangkipkoech@gmail.com> * Revert "Transfer all tests to a tests module (#48)" (#50) This reverts commit 332dd7e. * Update issue templates * Create django.yml * github templates (#52) * Update README.md * Update README.md * Fix phone number bug additon of the phone number field to the admin.py file. making the field both visible on the update user and add user pages. Co-authered-by Hellen <https://github.com/hellen-22> modified: accounts/admin.py * Create django.yml * Update README.md * Creation of a pull request template this template is to help guide us Write descriptive pull requests new file: pull_request_template.md * Update README.md * Update django.yml * Update django.yml * Transfer tests (#53) * doc:update README * add tests module in accounts and blog folders and delete all tests.py files * handling Images (#54) * feat:default phone number to have +254 isocode when creating superuser (#56) * Update README.md * Tamar-autentication * Update README.md * Wanjirumurira (#60) * handling Images * adding a default display picture * Changing the site titles (#58) admin.site.site_header = "SpaceYaTech Admin" admin.site.site_title = "SpaceYaTech Admin Portal" admin.site.index_title = "Welcome to SpaceYaTech Techies Portal" modified: CMS/urls.py * setting * resolve * urls-model * update * admin-urls-update * Clear unwanted files from the VC (git) Removing the batch file and also the images that were uploaded this is so that they dont occupy space modified: .gitignore deleted: local.bat deleted: media/blank-profile-picture.png deleted: tamar.png * Update CMS/urls.py Co-authored-by: Ernest Wambua <43074705+tallninja@users.noreply.github.com> Co-authored-by: Hellen Wainaina <58620060+hellen-22@users.noreply.github.com> Co-authored-by: Hellen Wainaina <hellenwain@gmail.com> Co-authored-by: Kipkoech Sang <sangkipkoech@gmail.com> Co-authored-by: Lawrence Juma <41073697+jumalaw98@users.noreply.github.com> Co-authored-by: Fredrick Waihenya <98146814+Fredrick-Waihenya@users.noreply.github.com> Co-authored-by: madbunny <madbunny@madbunny.madbunny> Co-authored-by: Jimmy Oty <jimmytron17@gmail.com> Co-authored-by: Eugene Kwaka <kwakaeugene@gmail.com> Co-authored-by: Jimmy Tron <oduorjames@hotmail.com> Co-authored-by: Wanjiru Murira <wanjirumurira@gmail.com> Co-authored-by: victorazangu <victorsazangu@gmail.com> Co-authored-by: Wamúyú <rutheve.eva@gmail.com> Co-authored-by: Ambrose Otundo <48138192+AmbroseOtundo@users.noreply.github.com> Co-authored-by: Ernest Wambua <43074705+tallninja@users.noreply.github.com>
No description provided.