Mercurial > nosedjango
annotate examples/project/zoo/test_fixtures.py @ 11:9af906a73061
added a 404.html file and updated the testcases to run against Django svn rev 8693 (post 1.0b1)
author | Victor Ng <victor@monkeybean.ca> |
---|---|
date | Fri, 29 Aug 2008 00:46:22 -0400 |
parents | 22ae9aa457af |
children |
rev | line source |
---|---|
5
22ae9aa457af
excercise more bits of the django 1.0b1 test framework
Victor Ng <victor@monkeybean.ca>
parents:
diff
changeset
|
1 from project.zoo.models import * |
22ae9aa457af
excercise more bits of the django 1.0b1 test framework
Victor Ng <victor@monkeybean.ca>
parents:
diff
changeset
|
2 |
22ae9aa457af
excercise more bits of the django 1.0b1 test framework
Victor Ng <victor@monkeybean.ca>
parents:
diff
changeset
|
3 class TestFixture1(object): |
22ae9aa457af
excercise more bits of the django 1.0b1 test framework
Victor Ng <victor@monkeybean.ca>
parents:
diff
changeset
|
4 fixtures = ['f1.json'] |
22ae9aa457af
excercise more bits of the django 1.0b1 test framework
Victor Ng <victor@monkeybean.ca>
parents:
diff
changeset
|
5 |
22ae9aa457af
excercise more bits of the django 1.0b1 test framework
Victor Ng <victor@monkeybean.ca>
parents:
diff
changeset
|
6 def test_count(self): |
22ae9aa457af
excercise more bits of the django 1.0b1 test framework
Victor Ng <victor@monkeybean.ca>
parents:
diff
changeset
|
7 assert Zoo.objects.count() == 1 |
22ae9aa457af
excercise more bits of the django 1.0b1 test framework
Victor Ng <victor@monkeybean.ca>
parents:
diff
changeset
|
8 assert Zoo.objects.get(id=1).name == 'f1' |
22ae9aa457af
excercise more bits of the django 1.0b1 test framework
Victor Ng <victor@monkeybean.ca>
parents:
diff
changeset
|
9 |
22ae9aa457af
excercise more bits of the django 1.0b1 test framework
Victor Ng <victor@monkeybean.ca>
parents:
diff
changeset
|
10 |
22ae9aa457af
excercise more bits of the django 1.0b1 test framework
Victor Ng <victor@monkeybean.ca>
parents:
diff
changeset
|
11 class TestFixture2(object): |
22ae9aa457af
excercise more bits of the django 1.0b1 test framework
Victor Ng <victor@monkeybean.ca>
parents:
diff
changeset
|
12 fixtures = ['f2.json'] |
22ae9aa457af
excercise more bits of the django 1.0b1 test framework
Victor Ng <victor@monkeybean.ca>
parents:
diff
changeset
|
13 def test_count(self): |
22ae9aa457af
excercise more bits of the django 1.0b1 test framework
Victor Ng <victor@monkeybean.ca>
parents:
diff
changeset
|
14 assert Zoo.objects.count() == 1 |
22ae9aa457af
excercise more bits of the django 1.0b1 test framework
Victor Ng <victor@monkeybean.ca>
parents:
diff
changeset
|
15 assert Zoo.objects.get(id=1).name == 'f2' |