author | Madhusudan.C.S <madhusudancs@gmail.com> |
Fri, 14 Jan 2011 01:00:22 +0530 | |
branch | buildout |
changeset 237 | 2c72b08003f5 |
parent 227 | 3c8f3b0e5b00 |
permissions | -rw-r--r-- |
227
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
1 |
""" |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
2 |
This file demonstrates two different styles of tests (one doctest and one |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
3 |
unittest). These will both pass when you run "manage.py test". |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
4 |
|
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
5 |
Replace these with more appropriate tests for your application. |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
6 |
""" |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
7 |
|
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
8 |
from django.test import TestCase |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
9 |
|
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
10 |
class SimpleTest(TestCase): |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
11 |
def test_basic_addition(self): |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
12 |
""" |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
13 |
Tests that 1 + 1 always equals 2. |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
14 |
""" |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
15 |
self.failUnlessEqual(1 + 1, 2) |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
16 |
|
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
17 |
__test__ = {"doctest": """ |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
18 |
Another way to test that 1 + 1 is equal to 2. |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
19 |
|
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
20 |
>>> 1 + 1 == 2 |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
21 |
True |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
22 |
"""} |
3c8f3b0e5b00
Add support for buildout and move the files to the directory to support buildout structure.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
23 |