Add initial tests for organizations
This commit is contained in:
committed by
Roberto Rosario
parent
fba20b0a91
commit
56f1a7d537
0
mayan/apps/organizations/tests/__init__.py
Normal file
0
mayan/apps/organizations/tests/__init__.py
Normal file
4
mayan/apps/organizations/tests/literals.py
Normal file
4
mayan/apps/organizations/tests/literals.py
Normal file
@@ -0,0 +1,4 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
TEST_ORGANIZATION_LABEL = 'test organization label'
|
||||
TEST_ORGANIZATION_EDITED_LABEL = 'test organization edited label'
|
||||
19
mayan/apps/organizations/tests/test_models.py
Normal file
19
mayan/apps/organizations/tests/test_models.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
from ..models import Organization
|
||||
|
||||
from .literals import TEST_ORGANIZATION_LABEL, TEST_ORGANIZATION_EDITED_LABEL
|
||||
|
||||
|
||||
class OrganizationTestCase(TestCase):
|
||||
def setUp(self):
|
||||
self.organization = Organization.objects.create(
|
||||
label=TEST_ORGANIZATION_LABEL
|
||||
)
|
||||
|
||||
def test_basic(self):
|
||||
queryset = Organization.objects.get_for_now()
|
||||
|
||||
self.assertEqual(queryset.exists(), True)
|
||||
Reference in New Issue
Block a user