1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2026-03-19 09:42:01 +01:00

Implémentation d'un test sur le delete de type

This commit is contained in:
Roland Haroutiounian 2015-06-26 12:18:51 +02:00
commit f503dab46a

View file

@ -9,7 +9,7 @@ import unittest
from EditorialModel.types import EmType
from EditorialModel.classes import EmClass
from EditorialModel.classtypes import EmClassType, EmNature
from EditorialModel.components import EmComponent
from EditorialModel.components import EmComponent, EmComponentNotExistError
from EditorialModel.fieldgroups import EmFieldGroup
from EditorialModel.fieldtypes import *
from EditorialModel.fields_types import Em_Field_Type
@ -69,3 +69,9 @@ class TestLinkedTypes(TypeTestCase):
self.assertNotIn(self.emtype,linked_types)
self.assertIn(self.emtype2, linked_types)
self.assertIn(self.emtype3, linked_types)
class TestDeleteTypes(TypeTestCase):
def testDeleteTypes(self):
type_name = self.emtype.name
self.emtype.delete()
self.assertRaises(EmComponentNotExistError, EmType(type_name))