evonove/django-stored-messages — pull request #6 by tilde (2014-04-15 16:12:19+00:00)
Title: Fixed some bugs with backend and rest_api

See the commit messages for details on the updates

Basically, the inbox_get of the two backends would return two different entitites, RedisBackend would correctly return the Message tuple with id, message etc, but the DefaultBackend would return an Inbox with a "message" property containing the actual Message entity (with message, id etc. propeties).

Also a test for the rest api Retrieve was missing, i added it and exposed both the aforementioned bug, and another nasty, nasty bug with the redis backend: since the Message entity was a namedtuple (which is iterable), the InboxSerializer was implicitly treating it as multiple entities to serialize, breaking the serialization completely. That took some time to pin. Fixed that too by passing an explicit Many=False to the serializer.