-
Notifications
You must be signed in to change notification settings - Fork 2
Add model unit tests #35
base: master
Are you sure you want to change the base?
Conversation
garoller
left a comment
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.
These tests look good, I just imported the wrong thing when I initially made the tests.py file, so some small changes have to be made.
Thank you!
index/tests.py
Outdated
| @@ -1,23 +1,170 @@ | |||
| import unittest | |||
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.
I think we should change this to from django.test import TestCase. I included this in the initial commit of this file, so I'm sorry about that. See the docs for details.
index/tests.py
Outdated
| # check code coverage | ||
|
|
||
|
|
||
| class PetitionModelTestCase(unittest.TestCase): |
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.
Change unittest.TestCase to TestCase
index/tests.py
Outdated
| self.assertFalse(p.check_tags()) | ||
|
|
||
|
|
||
| class UserModelTestCase(unittest.TestCase): |
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.
Change unittest.TestCase to TestCase
index/tests.py
Outdated
| self.assertTrue(u.admin) | ||
|
|
||
|
|
||
| class ResponseModelTestCase(unittest.TestCase): |
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.
Change unittest.TestCase to TestCase
Changes made:
These changes will resolve #27.
Changes not made:
Current unit tests are based very closely off the current model, so drastic changes in the model may require a restructuring of the unit tests.