Beispiel #1
0
 def test_bounded_int_invalid_convertion(self):
     bi = v2.BoundedInt(1, 5)
     self.assertRaises(TypeError, bi.frombasetype, wsme)
Beispiel #2
0
 def test_bounded_int_min(self):
     bi = v2.BoundedInt(min=5)
     self.assertEqual(bi.validate(7), 7)
     self.assertRaises(wsme.exc.ClientSideError, bi.validate, -1)
Beispiel #3
0
 def test_bounded_int_convertion(self):
     bi = v2.BoundedInt(1, 5)
     self.assertEqual(bi.frombasetype("2"), 2)