class TestNoneOf(unittest.TestCase): def setUp(self): self.n = NoneOf(UBInt8("foo"), [4, 5, 6, 7]) def test_trivial(self): pass def test_parse(self): self.assertEqual(self.n.parse(six.b("\x08")), 8) def test_parse_invalid(self): self.assertRaises(ValidationError, self.n.parse, six.b("\x06"))
class TestNoneOf(unittest.TestCase): def setUp(self): self.n = NoneOf(UBInt8("foo"), [4, 5, 6, 7]) def test_trivial(self): pass def test_parse(self): self.assertEqual(self.n.parse("\x08"), 8) def test_parse_invalid(self): self.assertRaises(ValidationError, self.n.parse, "\x06")
def setUp(self): self.n = NoneOf(UBInt8("foo"), [4, 5, 6, 7])