def METHOD_NAME(self):
    self.failUnless(BitPaddedInt.has_valid_padding(b"\xff\xff", bits=8))
    self.failIf(BitPaddedInt.has_valid_padding(b"\xff"))
    self.failIf(BitPaddedInt.has_valid_padding(b"\x00\xff"))
    self.failUnless(BitPaddedInt.has_valid_padding(b"\x7f\x7f"))
    self.failIf(BitPaddedInt.has_valid_padding(b"\x7f", bits=6))
    self.failIf(BitPaddedInt.has_valid_padding(b"\x9f", bits=6))
    self.failUnless(BitPaddedInt.has_valid_padding(b"\x3f", bits=6))
    self.failUnless(BitPaddedInt.has_valid_padding(0xff, bits=8))
    self.failIf(BitPaddedInt.has_valid_padding(0xff))
    self.failIf(BitPaddedInt.has_valid_padding(0xff << 8))
    self.failUnless(BitPaddedInt.has_valid_padding(0x7f << 8))
    self.failIf(BitPaddedInt.has_valid_padding(0x9f << 32, bits=6))
    self.failUnless(BitPaddedInt.has_valid_padding(0x3f << 16, bits=6))