sdi/tests.py
author Madhusudan.C.S <madhusudancs@gmail.com>
Fri, 06 Aug 2010 14:24:50 +0530
branchanoop
changeset 217 69f9624b0129
parent 4 ac7eaa878437
permissions -rw-r--r--
Script to allot accommodation and send mails have been added.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     1
"""
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     2
This file demonstrates two different styles of tests (one doctest and one
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     3
unittest). These will both pass when you run "manage.py test".
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     4
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     5
Replace these with more appropriate tests for your application.
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     6
"""
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     7
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     8
from django.test import TestCase
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
     9
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    10
class SimpleTest(TestCase):
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    11
    def test_basic_addition(self):
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    12
        """
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    13
        Tests that 1 + 1 always equals 2.
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    14
        """
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    15
        self.failUnlessEqual(1 + 1, 2)
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    16
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    17
__test__ = {"doctest": """
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    18
Another way to test that 1 + 1 is equal to 2.
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    19
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    20
>>> 1 + 1 == 2
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    21
True
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    22
"""}
ac7eaa878437 created app named sdi which means Sage Days India
nishanth
parents:
diff changeset
    23