예제 #1
0
 def test_compare_large_policies_without_differences(self):
     """ Testing two larger policies which are identical except for:
             * The statements are in different orders
             * The contents of the statements are also in different orders
             * The second contains a list of length one for the Principal whereas in the first it is a string
     """
     self.assertFalse(compare_policies(self.larger_policy_one, self.larger_policy_two))
예제 #2
0
 def test_compare_numeric_policy_number_and_string_are_equal(self):
     """ Testing two policies one using a quoted number, the other an int """
     self.assertFalse(compare_policies(self.numeric_policy_string, self.numeric_policy_number))
예제 #3
0
 def test_compare_boolean_policy_bool_and_string_are_equal(self):
     """ Testing two policies one using a quoted boolean, the other a bool """
     self.assertFalse(compare_policies(self.bool_policy_string, self.bool_policy_bool))
예제 #4
0
 def test_compare_smaller_policy_with_larger(self):
     """ Testing two policies of different sizes """
     self.assertTrue(compare_policies(self.larger_policy_one, self.small_policy_one))
예제 #5
0
 def test_compare_larger_policies_with_difference(self):
     """ Testing two larger policies which are identical except for:
             * one different principal
     """
     self.assertTrue(compare_policies(self.larger_policy_two, self.larger_policy_three))
예제 #6
0
 def test_compare_small_policies_without_differences(self):
     """ Testing two small policies which are identical except for:
             * The contents of the statement are in different orders
             * The second policy contains a list of length one whereas in the first it is a string
     """
     self.assertFalse(compare_policies(self.small_policy_one, self.small_policy_two))