def test_one_of(self): conds = ["Bilbo", "Frodo"] one_of("hobbits", {"first": "Bilbo"}, "first", conds) one_of("hobbits", {"first": "Frodo"}, "first", conds) one_of("hobbits", {"first": Ref(AWS_REGION)}, "first", conds) with self.assertRaises(ValueError): one_of("hobbits", {"first": "Gandalf"}, "first", conds) one_of("hobbits", {"first": "Gandalf"}, "second", conds)
def test_one_of(self): conds = ['Bilbo', 'Frodo'] one_of('hobbits', {"first": "Bilbo"}, "first", conds) one_of('hobbits', {"first": "Frodo"}, "first", conds) with self.assertRaises(ValueError): one_of('hobbits', {"first": "Gandalf"}, "first", conds) one_of('hobbits', {"first": "Gandalf"}, "second", conds)