src/core/tests.py
author ymh <ymh.work@gmail.com>
Tue, 30 Jul 2013 16:21:04 +0200
changeset 81 e78e5a2017b6
parent 0 4095911a7830
child 334 169b7cfd1f58
permissions -rw-r--r--
Add a way to show trees in the result list for terms. This mode is activated only if a thesaurus is selected, if the "node" sort field is selected and no other field than a thesaurus node is selected.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
4095911a7830 Jocondelab first commit before design
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
"""
4095911a7830 Jocondelab first commit before design
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
This file demonstrates writing tests using the unittest module. These will pass
4095911a7830 Jocondelab first commit before design
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
when you run "manage.py test".
4095911a7830 Jocondelab first commit before design
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
4095911a7830 Jocondelab first commit before design
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
Replace this with more appropriate tests for your application.
4095911a7830 Jocondelab first commit before design
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
"""
4095911a7830 Jocondelab first commit before design
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
4095911a7830 Jocondelab first commit before design
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
from django.test import TestCase
4095911a7830 Jocondelab first commit before design
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
4095911a7830 Jocondelab first commit before design
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
4095911a7830 Jocondelab first commit before design
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
class SimpleTest(TestCase):
4095911a7830 Jocondelab first commit before design
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
    def test_basic_addition(self):
4095911a7830 Jocondelab first commit before design
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
        """
4095911a7830 Jocondelab first commit before design
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
        Tests that 1 + 1 always equals 2.
4095911a7830 Jocondelab first commit before design
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
        """
4095911a7830 Jocondelab first commit before design
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
        self.assertEqual(1 + 1, 2)