def test_pattern_multiple_all(self):
     s = String(["foo", "bar", "baz"])
     s.condition = "Equals"
     s.apply_condition = "ALL"
     # If we change @apply_condition from the default, it should match
     # that value.
     self.assertTrue(b'apply_condition="ALL"' in s.to_xml())
Exemple #2
0
 def test_pattern_multiple_all(self):
     s = String(["foo", "bar", "baz"])
     s.condition = "Equals"
     s.apply_condition = "ALL"
     # If we change @apply_condition from the default, it should match
     # that value.
     self.assertTrue(b'apply_condition="ALL"' in s.to_xml())
 def test_pattern_multiple(self):
     s = String(["foo", "bar", "baz"])
     s.condition = "Equals"
     # @apply_condition should be set when there is a @condition and the
     # value is a list.
     self.assertTrue(b'apply_condition="ANY"' in s.to_xml())
 def test_pattern_single(self):
     s = String("foo")
     s.condition = "Equals"
     # @apply_condition should not be set if the value is not a list.
     self.assertFalse(b'apply_condition' in s.to_xml())
Exemple #5
0
 def test_pattern_multiple(self):
     s = String(["foo", "bar", "baz"])
     s.condition = "Equals"
     # @apply_condition should be set when there is a @condition and the
     # value is a list.
     self.assertTrue(b'apply_condition="ANY"' in s.to_xml())
Exemple #6
0
 def test_pattern_single(self):
     s = String("foo")
     s.condition = "Equals"
     # @apply_condition should not be set if the value is not a list.
     self.assertFalse(b'apply_condition' in s.to_xml())