summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-03-18 15:45:27 +0000
committerErik Johnston <erik@matrix.org>2019-03-18 15:56:04 +0000
commit68a9d1fc34beead269f715538298bef1114569b3 (patch)
tree961de573e53402dbebc6fc730a752585797194b4 /tests
parentDon't spam check actions by admins (diff)
downloadsynapse-68a9d1fc34beead269f715538298bef1114569b3.tar.xz
Add rules to DomainRuleChecker
Diffstat (limited to 'tests')
-rw-r--r--tests/rulecheck/test_domainrulecheck.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/rulecheck/test_domainrulecheck.py b/tests/rulecheck/test_domainrulecheck.py

index ebcf5ca44e..055fd49915 100644 --- a/tests/rulecheck/test_domainrulecheck.py +++ b/tests/rulecheck/test_domainrulecheck.py
@@ -31,13 +31,13 @@ class DomainRuleCheckerTestCase(unittest.TestCase): } check = DomainRuleChecker(config) self.assertTrue( - check.user_may_invite("test:source_one", "test:target_one", "room") + check.user_may_invite("test:source_one", "test:target_one", "room", False) ) self.assertTrue( - check.user_may_invite("test:source_one", "test:target_two", "room") + check.user_may_invite("test:source_one", "test:target_two", "room", False) ) self.assertTrue( - check.user_may_invite("test:source_two", "test:target_two", "room") + check.user_may_invite("test:source_two", "test:target_two", "room", False) ) def test_disallowed(self): @@ -51,16 +51,16 @@ class DomainRuleCheckerTestCase(unittest.TestCase): } check = DomainRuleChecker(config) self.assertFalse( - check.user_may_invite("test:source_one", "test:target_three", "room") + check.user_may_invite("test:source_one", "test:target_three", "room", False) ) self.assertFalse( - check.user_may_invite("test:source_two", "test:target_three", "room") + check.user_may_invite("test:source_two", "test:target_three", "room", False) ) self.assertFalse( - check.user_may_invite("test:source_two", "test:target_one", "room") + check.user_may_invite("test:source_two", "test:target_one", "room", False) ) self.assertFalse( - check.user_may_invite("test:source_four", "test:target_one", "room") + check.user_may_invite("test:source_four", "test:target_one", "room", False) ) def test_default_allow(self): @@ -73,7 +73,7 @@ class DomainRuleCheckerTestCase(unittest.TestCase): } check = DomainRuleChecker(config) self.assertTrue( - check.user_may_invite("test:source_three", "test:target_one", "room") + check.user_may_invite("test:source_three", "test:target_one", "room", False) ) def test_default_deny(self): @@ -86,7 +86,7 @@ class DomainRuleCheckerTestCase(unittest.TestCase): } check = DomainRuleChecker(config) self.assertFalse( - check.user_may_invite("test:source_three", "test:target_one", "room") + check.user_may_invite("test:source_three", "test:target_one", "room", False) ) def test_config_parse(self):