diff examples/project/zoo/test_fixtures.py @ 5:22ae9aa457af

excercise more bits of the django 1.0b1 test framework
author Victor Ng <victor@monkeybean.ca>
date Thu, 28 Aug 2008 11:29:21 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/project/zoo/test_fixtures.py	Thu Aug 28 11:29:21 2008 -0400
@@ -0,0 +1,15 @@
+from project.zoo.models import *
+
+class TestFixture1(object):
+    fixtures = ['f1.json']
+
+    def test_count(self):
+        assert Zoo.objects.count() == 1
+        assert Zoo.objects.get(id=1).name == 'f1'
+
+
+class TestFixture2(object):
+    fixtures = ['f2.json']
+    def test_count(self):
+        assert Zoo.objects.count() == 1
+        assert Zoo.objects.get(id=1).name == 'f2'