annotate examples/project/zoo/tests.py @ 8:a82369f2574e

http client tests
author Victor Ng <victor@monkeybean.ca>
date Thu, 28 Aug 2008 12:42:31 -0400
parents
children 35178e70f1cd
rev   line source
8
a82369f2574e http client tests
Victor Ng <victor@monkeybean.ca>
parents:
diff changeset
1 from django.test import TestCase
a82369f2574e http client tests
Victor Ng <victor@monkeybean.ca>
parents:
diff changeset
2 from project.zoo.models import Zoo
a82369f2574e http client tests
Victor Ng <victor@monkeybean.ca>
parents:
diff changeset
3
a82369f2574e http client tests
Victor Ng <victor@monkeybean.ca>
parents:
diff changeset
4 class TestDjango(TestCase):
a82369f2574e http client tests
Victor Ng <victor@monkeybean.ca>
parents:
diff changeset
5 def testcase1(self):
a82369f2574e http client tests
Victor Ng <victor@monkeybean.ca>
parents:
diff changeset
6 zoo = Zoo.objects.create(name='blah')
a82369f2574e http client tests
Victor Ng <victor@monkeybean.ca>
parents:
diff changeset
7 assert Zoo.objects.count() == 1
a82369f2574e http client tests
Victor Ng <victor@monkeybean.ca>
parents:
diff changeset
8 import pdb
a82369f2574e http client tests
Victor Ng <victor@monkeybean.ca>
parents:
diff changeset
9 pdb.set_trace()
a82369f2574e http client tests
Victor Ng <victor@monkeybean.ca>
parents:
diff changeset
10
a82369f2574e http client tests
Victor Ng <victor@monkeybean.ca>
parents:
diff changeset
11 def testcase2(self):
a82369f2574e http client tests
Victor Ng <victor@monkeybean.ca>
parents:
diff changeset
12 zoo = Zoo.objects.create(name='blah')
a82369f2574e http client tests
Victor Ng <victor@monkeybean.ca>
parents:
diff changeset
13 assert Zoo.objects.count() == 1
a82369f2574e http client tests
Victor Ng <victor@monkeybean.ca>
parents:
diff changeset
14