1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2026-06-14 06:20:48 +02:00

Fixing tests name to actually make them run

Test functions name as tests files name must begin with test in order to be run by manage.py test
This commit is contained in:
Yann 2015-05-27 11:20:25 +02:00
commit 18c497a27b
3 changed files with 4 additions and 5 deletions

View file

@ -16,9 +16,9 @@ class EmComponent(object):
def __init__(self, id_or_name):
if self is EmComponent:
raise EnvironmentError('Abstract class')
if id_or_name is int:
if type(id_or_name) is int:
self.id = id_or_name
elif id_or_name is str:
elif type(id_or_name) is str:
self.name = id_or_name
self.populate()
else:

View file

View file

@ -2,8 +2,7 @@ from django.test import TestCase
from EditorialModel.lib.component import EmComponent
class ComponentTestCase(TestCase):
def setup(self):
testComp = EmComponent(2)
def component_instanciate_with_numeric_id(self):
def test_component_instanciate_with_numeric_id(self):
testComp = EmComponent(2)
self.assertEqual(testComp.id, 2)