Mercurial > personas_backend
changeset 24:ed1099ba2a9b
Made test suite a bit more robust.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Thu, 28 Feb 2008 10:21:07 -0800 |
parents | dc1321fc923c |
children | 197b05fbd4cc |
files | PersonasBackend/personas/tests.py |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/PersonasBackend/personas/tests.py Thu Feb 28 10:03:36 2008 -0800 +++ b/PersonasBackend/personas/tests.py Thu Feb 28 10:21:07 2008 -0800 @@ -1,8 +1,20 @@ import unittest from django.test.client import Client +from PersonasBackend.personas import models class JsonTests( unittest.TestCase ): + def setUp( self ): + self.cat = models.Category( name = "Random Things" ) + self.cat.save() + self.persona = models.Persona( name = "Test Persona", + category = self.cat ) + self.persona.save() + + def tearDown( self ): + self.persona.delete() + self.cat.delete() + def testCategoriesWorks( self ): # Just a smoke test to make sure nothing crashes... client = Client()