praekeltfoundation / vumi

Messaging engine for the delivery of SMS, Star Menu and chat messages to diverse audiences in emerging markets and beyond.
BSD 3-Clause "New" or "Revised" License
421 stars 131 forks source link

fake_redis should raise a ResponseError when given a non-int value for "expire" #1046

Open wimkeir opened 8 years ago

wimkeir commented 8 years ago

There appears to be a behaviour mismatch between "real" Redis and fake_redis. When given a command like EXPIRE key 1.5, Redis raises a ResponseError, claiming that the value is not an int. fake_redis should also raise an error when expire() is passed a seconds parameter that is not an int. We should also include a test to assert that this error is raised.