Browse Source

Patch minor bugs in tests and bootstrap code

Yentl Van Tendeloo 7 years ago
parent
commit
0550927980
2 changed files with 5 additions and 1 deletions
  1. 1 1
      bootstrap/core_algorithm.alc
  2. 4 0
      unit/test_all.py

+ 1 - 1
bootstrap/core_algorithm.alc

@@ -2263,7 +2263,7 @@ String function cmd_group_kick(group_name : String, other_user_name : String):
 			other_user_id = get_user_id(other_user_name)
 			if (other_user_id != ""):
 				Element overlap
-				if (bool_not(set_in(allAssociationDestinations(core, other_user_id, "belongsTo"), group_id))):
+				if (set_in(allAssociationDestinations(core, other_user_id, "belongsTo"), group_id)):
 					overlap = set_overlap(allIncomingAssociationInstances(core, group_id, "belongsTo"), allOutgoingAssociationInstances(core, other_user_id, "belongsTo"))
 					model_delete_element(core,set_pop(overlap))
 

+ 4 - 0
unit/test_all.py

@@ -2624,6 +2624,10 @@ class TestModelverse(unittest.TestCase):
         except UserNotInGroup:
             pass
 
+        self.do_as_user("admin", group_delete, [group_name_1])
+        self.do_as_user("admin", group_delete, [group_name_2])
+        self.do_as_user("admin", group_delete, [group_name_3])
+
     def do_create_user(self, name):
         self.do_as_user(name, lambda : 1, [])