|
@@ -398,13 +398,6 @@ class TestModelverse(unittest.TestCase):
|
|
|
assert {'__id': "A", "__type": "Class", "abstract": None, "constraint": {"AL": ""}, "lower_cardinality": None, "upper_cardinality": None, "name": "A"} in lst
|
|
|
assert {'__id': "B", "__type": "Class", "abstract": True, "constraint": {"AL": ""}, "lower_cardinality": None, "upper_cardinality": None, "name": "B"} in lst
|
|
|
|
|
|
- try:
|
|
|
- # Cannot upload model to occupied location
|
|
|
- model_add("users/user/test/a", "formalisms/SimpleClassDiagrams")
|
|
|
- self.fail()
|
|
|
- except ModelExists:
|
|
|
- assert model_list_full("users/user/test") == set([("a", "user", "nobody", "200"), ("b", "user", "nobody", "200")])
|
|
|
-
|
|
|
try:
|
|
|
# Cannot upload model to unwritable location at root
|
|
|
model_add("z", "formalisms/SimpleClassDiagrams")
|
|
@@ -484,13 +477,12 @@ class TestModelverse(unittest.TestCase):
|
|
|
assert model_move("users/user/test/b", "users/user/test/a") == None
|
|
|
assert model_list_full("users/user/test") == set([("a", "user", "nobody", "222")])
|
|
|
|
|
|
- # Test move if destination exists
|
|
|
model_add("users/user/test/b", "formalisms/SimpleClassDiagrams")
|
|
|
assert model_list_full("users/user/test") == set([("a", "user", "nobody", "222"), ("b", "user", "nobody", "200")])
|
|
|
try:
|
|
|
model_move("users/user/test/a", "users/user/test/b")
|
|
|
self.fail()
|
|
|
- except ModelExists:
|
|
|
+ except LocationExists:
|
|
|
pass
|
|
|
assert model_list_full("users/user/test") == set([("a", "user", "nobody", "222"), ("b", "user", "nobody", "200")])
|
|
|
|
|
@@ -4161,13 +4153,6 @@ class TestModelverse(unittest.TestCase):
|
|
|
except UnknownM3:
|
|
|
assert "n" not in model_list("users/user/test")
|
|
|
|
|
|
- # Try to create activity that already exists
|
|
|
- sig = transformation_signature("users/user/test/c")
|
|
|
- try:
|
|
|
- transformation_add_MANUAL({}, {}, "users/user/test/c")
|
|
|
- except ModelExists:
|
|
|
- assert sig == transformation_signature("users/user/test/c")
|
|
|
-
|
|
|
# Source metamodel is folder
|
|
|
try:
|
|
|
transformation_add_MANUAL({"MODEL_A": "users"}, {"MODEL_B": "formalisms/SimpleClassDiagrams"}, "users/user/test/p")
|
|
@@ -4307,14 +4292,6 @@ class TestModelverse(unittest.TestCase):
|
|
|
except UnknownM3:
|
|
|
assert "n" not in model_list("users/user/test")
|
|
|
|
|
|
- # Try to create activity that already exists
|
|
|
- sig = transformation_signature("users/user/test/c")
|
|
|
- try:
|
|
|
- transformation_add_AL({}, {}, "users/user/test/c", default_function)
|
|
|
- self.fail()
|
|
|
- except ModelExists:
|
|
|
- assert sig == transformation_signature("users/user/test/c")
|
|
|
-
|
|
|
# Compilation error
|
|
|
try:
|
|
|
transformation_add_AL({}, {}, "users/user/test/o", "adfadf")
|
|
@@ -4465,14 +4442,6 @@ class TestModelverse(unittest.TestCase):
|
|
|
except UnknownM3:
|
|
|
assert "n" not in model_list("users/user/test")
|
|
|
|
|
|
- # Try to create activity that already exists
|
|
|
- sig = transformation_signature("users/user/test/c")
|
|
|
- try:
|
|
|
- transformation_add_MT({"MODEL_A": "users/user/test/A"}, {}, "users/user/test/c", default_function)
|
|
|
- self.fail()
|
|
|
- except ModelExists:
|
|
|
- assert sig == transformation_signature("users/user/test/c")
|
|
|
-
|
|
|
# Compilation error
|
|
|
try:
|
|
|
transformation_add_MT({"MODEL_A": "users/user/test/A"}, {}, "users/user/test/o", "adfa")
|