Browse Source

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

Roland Haroutiounian 8 years ago
parent
commit
51feb0654c
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      tests/datahandlers/test_datahandler.py

+ 7
- 0
tests/datahandlers/test_datahandler.py View File

@@ -35,3 +35,10 @@ class DataHandlerTestCase(unittest.TestCase):
35 35
         DataHandler.register_new_handler('test_varchar', Varchar)
36 36
         self.assertEqual(DataHandler.from_name('test_varchar'), Varchar)
37 37
 
38
+    def test_from_missing_name(self):
39
+        DataHandler.register_new_handler('test_varchar1', Varchar)
40
+        DataHandler.register_new_handler('test_varchar2', Varchar)
41
+        try:
42
+            DataHandler.from_name('test_varchar3')
43
+        except Exception as err:
44
+            self.assertEqual(NameError, type(err))

Loading…
Cancel
Save