Mercurial > nosedjango
comparison 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 |
comparison
equal
deleted
inserted
replaced
4:20bca08c0828 | 5:22ae9aa457af |
---|---|
1 from project.zoo.models import * | |
2 | |
3 class TestFixture1(object): | |
4 fixtures = ['f1.json'] | |
5 | |
6 def test_count(self): | |
7 assert Zoo.objects.count() == 1 | |
8 assert Zoo.objects.get(id=1).name == 'f1' | |
9 | |
10 | |
11 class TestFixture2(object): | |
12 fixtures = ['f2.json'] | |
13 def test_count(self): | |
14 assert Zoo.objects.count() == 1 | |
15 assert Zoo.objects.get(id=1).name == 'f2' |