Add clean up method to OrganizationModelTestCase

This commit is contained in:
Roberto Rosario
2016-05-30 19:18:23 -04:00
parent f9670ea7c2
commit 3ebadf763b

View File

@@ -7,12 +7,16 @@ from ..models import Organization
from .literals import TEST_ORGANIZATION_LABEL, TEST_ORGANIZATION_EDITED_LABEL
class OrganizationTestCase(TestCase):
class OrganizationModelTestCase(TestCase):
def setUp(self):
self.organization = Organization.objects.create(
label=TEST_ORGANIZATION_LABEL
)
def tearDown(self):
self.organization.delete()
Organization.objects.clear_cache()
def test_basic(self):
queryset = Organization.objects.get_for_now()