view 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
line wrap: on
line source

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'