Browse Source

Added minimal permission_modify test (failing!)

Yentl Van Tendeloo 7 years ago
parent
commit
17714ee538
2 changed files with 20 additions and 2 deletions
  1. 19 1
      unit/test_all.py
  2. 1 1
      wrappers/modelverse_SCCD.py

+ 19 - 1
unit/test_all.py

@@ -185,11 +185,29 @@ class TestModelverse(unittest.TestCase):
         instantiate("test/a", "Finish")
         instantiate("test/a", "Finish")
         assert verify("test/a", "formalisms/ProcessModel") == "OK"
         assert verify("test/a", "formalisms/ProcessModel") == "OK"
 
 
+    def test_op_permission_modify(self):
+        assert model_list_full("formalisms") == set([("SimpleClassDiagrams", "admin", "admin", "221"),
+                                                     ("ActionLanguage", "admin", "admin", "221"),
+                                                     ("TypeMapping", "admin", "admin", "221"),
+                                                     ("Tracability", "admin", "admin", "221"),
+                                                     ("ProcessModel", "admin", "admin", "221"),
+                                                     ("ManualOperation", "admin", "admin", "221"),
+                                                     ("Bottom", "admin", "admin", "221"),
+                                                    ])
+        permission_modify("formalisms/SimpleClassDiagrams", "000")
+        assert model_list_full("formalisms") == set([("SimpleClassDiagrams", "admin", "admin", "000"),
+                                                     ("ActionLanguage", "admin", "admin", "221"),
+                                                     ("TypeMapping", "admin", "admin", "221"),
+                                                     ("Tracability", "admin", "admin", "221"),
+                                                     ("ProcessModel", "admin", "admin", "221"),
+                                                     ("ManualOperation", "admin", "admin", "221"),
+                                                     ("Bottom", "admin", "admin", "221"),
+                                                    ])
+
     """
     """
     def test_op_model_add(self):
     def test_op_model_add(self):
     def test_op_model_move(self):
     def test_op_model_move(self):
     def test_op_model_delete(self):
     def test_op_model_delete(self):
-    def test_op_verify(self):
     def test_op_model_overwrite(self):
     def test_op_model_overwrite(self):
     def test_op_user_delete(self):
     def test_op_user_delete(self):
     def test_op_model_render(self):
     def test_op_model_render(self):

+ 1 - 1
wrappers/modelverse_SCCD.py

@@ -1,7 +1,7 @@
 """
 """
 Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
 Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
 
 
-Date:   Tue Jun  5 16:38:58 2018
+Date:   Tue Jun  5 16:47:02 2018
 
 
 Model author: Yentl Van Tendeloo
 Model author: Yentl Van Tendeloo
 Model name:   MvK Server
 Model name:   MvK Server