Statistics
| Branch: | Tag: | Revision:

root / pithos / public / tests.py @ bcb7c5a8

History | View | Annotate | Download (514 Bytes)

1 f7b1d2af Antony Chazapis
"""
2 f7b1d2af Antony Chazapis
This file demonstrates two different styles of tests (one doctest and one
3 f7b1d2af Antony Chazapis
unittest). These will both pass when you run "manage.py test".
4 f7b1d2af Antony Chazapis

5 f7b1d2af Antony Chazapis
Replace these with more appropriate tests for your application.
6 f7b1d2af Antony Chazapis
"""
7 f7b1d2af Antony Chazapis
8 f7b1d2af Antony Chazapis
from django.test import TestCase
9 f7b1d2af Antony Chazapis
10 f7b1d2af Antony Chazapis
class SimpleTest(TestCase):
11 f7b1d2af Antony Chazapis
    def test_basic_addition(self):
12 f7b1d2af Antony Chazapis
        """
13 f7b1d2af Antony Chazapis
        Tests that 1 + 1 always equals 2.
14 f7b1d2af Antony Chazapis
        """
15 f7b1d2af Antony Chazapis
        self.failUnlessEqual(1 + 1, 2)
16 f7b1d2af Antony Chazapis
17 f7b1d2af Antony Chazapis
__test__ = {"doctest": """
18 f7b1d2af Antony Chazapis
Another way to test that 1 + 1 is equal to 2.
19 f7b1d2af Antony Chazapis

20 f7b1d2af Antony Chazapis
>>> 1 + 1 == 2
21 f7b1d2af Antony Chazapis
True
22 f7b1d2af Antony Chazapis
"""}