Explorar o código

Test corner cases model_types

Yentl Van Tendeloo %!s(int64=7) %!d(string=hai) anos
pai
achega
d003454bcb
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      unit/test_all.py

+ 10 - 0
unit/test_all.py

@@ -802,6 +802,16 @@ class TestModelverse(unittest.TestCase):
         assert entry[1].startswith("type mappings/")
         assert entry[2] == None
 
+        # Test non-existing model
+        try:
+            model_types("adfadf")
+            self.fail()
+        except UnknownModel:
+            pass
+
+        # Test non-model location
+        assert model_types("formalisms") == set([])
+
     def test_op_folder_create(self):
         # Create a folder
         assert folder_create("users/user/test/folder_a") == None