def METHOD_NAME(self):
    self.conv.unit = 'B'
    with self.assertRaises(ValueError) as cm:
        self.conv('10km')
    self.assertEqual("Unit must be 'b' (bit) or 'B' (byte), not 'm'", str(cm.exception))