author | nishanth |
Tue, 20 Apr 2010 15:31:21 +0530 | |
changeset 12 | 81cd0140a0f2 |
parent 4 | e3b8a3ae3857 |
permissions | -rw-r--r-- |
4
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
1 |
""" |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
2 |
This file demonstrates two different styles of tests (one doctest and one |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
3 |
unittest). These will both pass when you run "manage.py test". |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
4 |
|
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
5 |
Replace these with more appropriate tests for your application. |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
6 |
""" |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
7 |
|
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
8 |
from django.test import TestCase |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
9 |
|
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
10 |
class SimpleTest(TestCase): |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
11 |
def test_basic_addition(self): |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
12 |
""" |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
13 |
Tests that 1 + 1 always equals 2. |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
14 |
""" |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
15 |
self.failUnlessEqual(1 + 1, 2) |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
16 |
|
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
17 |
__test__ = {"doctest": """ |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
18 |
Another way to test that 1 + 1 is equal to 2. |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
19 |
|
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
20 |
>>> 1 + 1 == 2 |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
21 |
True |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
22 |
"""} |
e3b8a3ae3857
added an app called event and created the event model.
nishanth
parents:
diff
changeset
|
23 |