Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 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)