1
0
Fork 0
mirror of https://github.com/yweber/lodel2.git synced 2025-10-30 19:19:03 +01:00

Added a test for a missing name in the from_name method's tests (for the DataHandler class)

This commit is contained in:
Roland Haroutiounian 2016-08-24 15:06:54 +02:00
commit 51feb0654c

View file

@ -35,3 +35,10 @@ class DataHandlerTestCase(unittest.TestCase):
DataHandler.register_new_handler('test_varchar', Varchar)
self.assertEqual(DataHandler.from_name('test_varchar'), Varchar)
def test_from_missing_name(self):
DataHandler.register_new_handler('test_varchar1', Varchar)
DataHandler.register_new_handler('test_varchar2', Varchar)
try:
DataHandler.from_name('test_varchar3')
except Exception as err:
self.assertEqual(NameError, type(err))