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:
parent
eeaaf945d2
commit
18c497a27b
3 changed files with 4 additions and 5 deletions
|
|
@ -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:
|
||||
|
|
|
|||
0
EditorialModel/test/__init__.py
Normal file
0
EditorialModel/test/__init__.py
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue