aboutsummaryrefslogtreecommitdiffstats
path: root/examples/objectstore/tests.py
diff options
context:
space:
mode:
authortom christie tom@tomchristie.com2011-01-23 23:08:16 +0000
committertom christie tom@tomchristie.com2011-01-23 23:08:16 +0000
commit4100242fa2395bef8db0c5ffbab6f5d0cf95301d (patch)
tree0c8efd4dfdbdc6af7dca234291f8f8c7e3b035ff /examples/objectstore/tests.py
parent99799032721a32220c32d4a74a950bdd07b13cb3 (diff)
downloaddjango-rest-framework-4100242fa2395bef8db0c5ffbab6f5d0cf95301d.tar.bz2
Sphinx docs, examples, lots of refactoring
Diffstat (limited to 'examples/objectstore/tests.py')
-rw-r--r--examples/objectstore/tests.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/objectstore/tests.py b/examples/objectstore/tests.py
new file mode 100644
index 00000000..2247054b
--- /dev/null
+++ b/examples/objectstore/tests.py
@@ -0,0 +1,23 @@
+"""
+This file demonstrates two different styles of tests (one doctest and one
+unittest). These will both pass when you run "manage.py test".
+
+Replace these with more appropriate tests for your application.
+"""
+
+from django.test import TestCase
+
+class SimpleTest(TestCase):
+ def test_basic_addition(self):
+ """
+ Tests that 1 + 1 always equals 2.
+ """
+ self.failUnlessEqual(1 + 1, 2)
+
+__test__ = {"doctest": """
+Another way to test that 1 + 1 is equal to 2.
+
+>>> 1 + 1 == 2
+True
+"""}
+