Example #1
0
 def test_allows_if_rule_allows_and_no_include(self):
     allow = qvarn.FilterAllow()
     include = qvarn.FilterInclude({}, allow)
     self.assertTrue(include.allow(None))
Example #2
0
 def test_allows_if_rule_denies_and_include_is_false(self):
     deny = qvarn.FilterDeny()
     include = qvarn.FilterInclude({'include': False}, deny)
     self.assertTrue(include.allow({}))
Example #3
0
 def test_allows_if_rule_allows_and_include_is_true(self):
     allow = qvarn.FilterAllow()
     include = qvarn.FilterInclude({'include': True}, allow)
     self.assertTrue(include.allow({}))
Example #4
0
 def test_denies_if_rule_allows_and_include_is_false(self):
     allow = qvarn.FilterAllow()
     include = qvarn.FilterInclude({'include': False}, allow)
     self.assertFalse(include.allow({}))
Example #5
0
 def test_denies_if_rule_denies_and_no_include(self):
     deny = qvarn.FilterDeny()
     include = qvarn.FilterInclude({}, deny)
     self.assertFalse(include.allow(None))