Add initial tests for organizations

This commit is contained in:
Baptiste GAILLET
2016-05-23 09:18:03 +02:00
committed by Roberto Rosario
parent fba20b0a91
commit 56f1a7d537
3 changed files with 23 additions and 0 deletions

View 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'

View 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)