Esempio n. 1
0
 def test_allows_if_rule_allows_and_no_include(self):
     allow = qvarn.FilterAllow()
     include = qvarn.FilterInclude({}, allow)
     self.assertTrue(include.allow(None))
Esempio n. 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({}))
Esempio n. 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({}))
Esempio n. 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({}))
Esempio n. 5
0
 def test_denies_if_rule_denies_and_no_include(self):
     deny = qvarn.FilterDeny()
     include = qvarn.FilterInclude({}, deny)
     self.assertFalse(include.allow(None))