Adding tests to the new feature
This commit is contained in:
parent
feb36f8fce
commit
e66f0b33c2
2 changed files with 7 additions and 0 deletions
|
@ -2,9 +2,11 @@
|
|||
------------------
|
||||
|
||||
* Support to Django 1.7 (I'm sorry to the delay)
|
||||
* Adding get_FIELD_list function
|
||||
* Thanks to:
|
||||
* `Hernil <https://github.com/hernil>`_
|
||||
* `Vasyl Stanislavchuk <https://github.com/vasyabigi>`_
|
||||
* `Litchfield <https://github.com/litchfield/>`_
|
||||
|
||||
0.1.2 (2014-04-04)
|
||||
------------------
|
||||
|
|
|
@ -40,7 +40,12 @@ class MultiSelectTestCase(TestCase):
|
|||
def test_object(self):
|
||||
book = Book.objects.get(id=1)
|
||||
self.assertEqual(book.get_tags_display(), 'Sex, Work, Happy')
|
||||
self.assertEqual(book.get_tags_list(), ['Sex', 'Work', 'Happy'])
|
||||
self.assertEqual(book.get_categories_display(), 'Handbooks and manuals by discipline, Books of literary criticism, Books about literature')
|
||||
self.assertEqual(book.get_categories_list(), ['Handbooks and manuals by discipline', 'Books of literary criticism', 'Books about literature'])
|
||||
|
||||
self.assertEqual(book.get_tags_list(), book.get_tags_display().split(', '))
|
||||
self.assertEqual(book.get_categories_list(), book.get_categories_display().split(', '))
|
||||
|
||||
def test_validate(self):
|
||||
book = Book.objects.get(id=1)
|
||||
|
|
Loading…
Reference in a new issue