Esempio n. 1
0
    def test_mutually_exclusive_novalue(self):
        conds = ['a', 'b', 'c']
        properties = {
            'a': Ref("AWS::NoValue"),
            'b': NoValue,
            'c': "AWS::Region",
        }

        mutually_exclusive("a", properties, conds)
Esempio n. 2
0
    def test_mutually_exclusive_novalue(self):
        conds = ["a", "b", "c"]
        properties = {
            "a": Ref("AWS::NoValue"),
            "b": NoValue,
            "c": "AWS::Region",
        }

        mutually_exclusive("a", properties, conds)
Esempio n. 3
0
 def test_mutually_exclusive(self):
     conds = ['a', 'b', 'c']
     mutually_exclusive('a', ['a'], conds)
     mutually_exclusive('b', ['b'], conds)
     mutually_exclusive('c', ['c'], conds)
     with self.assertRaises(ValueError):
         mutually_exclusive('ac', ['a', 'c'], conds)
     with self.assertRaises(ValueError):
         mutually_exclusive('abc', ['a', 'b', 'c'], conds)
Esempio n. 4
0
    def test_mutually_exclusive_novalue(self):
        conds = ['a', 'b', 'c']
        properties = {
            'a': Ref("AWS::NoValue"),
            'b': NoValue,
            'c': "AWS::Region",
        }

        mutually_exclusive("a", properties, conds)
Esempio n. 5
0
 def test_mutually_exclusive(self):
     conds = ['a', 'b', 'c']
     mutually_exclusive('a', ['a'], conds)
     mutually_exclusive('b', ['b'], conds)
     mutually_exclusive('c', ['c'], conds)
     with self.assertRaises(ValueError):
         mutually_exclusive('ac', ['a', 'c'], conds)
     with self.assertRaises(ValueError):
         mutually_exclusive('abc', ['a', 'b', 'c'], conds)
Esempio n. 6
0
 def test_mutually_exclusive(self):
     conds = ["a", "b", "c"]
     mutually_exclusive("a", {"a": "apple"}, conds)
     mutually_exclusive("b", {"b": "banana"}, conds)
     mutually_exclusive("c", {"c": "carrot"}, conds)
     with self.assertRaises(ValueError):
         mutually_exclusive("ac", {"a": "apple", "c": "carrot"}, conds)
     with self.assertRaises(ValueError):
         mutually_exclusive(
             "abc", {"a": "apple", "b": "banana", "c": "carrot"}, conds
         )
Esempio n. 7
0
 def test_mutually_exclusive(self):
     conds = ['a', 'b', 'c']
     mutually_exclusive('a', {"a": "apple"}, conds)
     mutually_exclusive('b', {"b": "banana"}, conds)
     mutually_exclusive('c', {"c": "carrot"}, conds)
     with self.assertRaises(ValueError):
         mutually_exclusive('ac', {"a": "apple", "c": "carrot"}, conds)
     with self.assertRaises(ValueError):
         mutually_exclusive(
             'abc', {"a": "apple", "b": "banana", "c": "carrot"}, conds
         )
Esempio n. 8
0
 def test_mutually_exclusive(self):
     conds = ['a', 'b', 'c']
     mutually_exclusive('a', {"a": "apple"}, conds)
     mutually_exclusive('b', {"b": "banana"}, conds)
     mutually_exclusive('c', {"c": "carrot"}, conds)
     with self.assertRaises(ValueError):
         mutually_exclusive('ac', {"a": "apple", "c": "carrot"}, conds)
     with self.assertRaises(ValueError):
         mutually_exclusive(
             'abc', {"a": "apple", "b": "banana", "c": "carrot"}, conds
         )