Add clean up method to OrganizationModelTestCase
This commit is contained in:
@@ -7,12 +7,16 @@ from ..models import Organization
|
|||||||
from .literals import TEST_ORGANIZATION_LABEL, TEST_ORGANIZATION_EDITED_LABEL
|
from .literals import TEST_ORGANIZATION_LABEL, TEST_ORGANIZATION_EDITED_LABEL
|
||||||
|
|
||||||
|
|
||||||
class OrganizationTestCase(TestCase):
|
class OrganizationModelTestCase(TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.organization = Organization.objects.create(
|
self.organization = Organization.objects.create(
|
||||||
label=TEST_ORGANIZATION_LABEL
|
label=TEST_ORGANIZATION_LABEL
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
self.organization.delete()
|
||||||
|
Organization.objects.clear_cache()
|
||||||
|
|
||||||
def test_basic(self):
|
def test_basic(self):
|
||||||
queryset = Organization.objects.get_for_now()
|
queryset = Organization.objects.get_for_now()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user