EnumAttribute

Merged Éloi Rivard requested to merge azmeuk/sheraf:enum into master
    >>> import enum
    ...
    >>> class Cowboy(sheraf.Model):
    ...     table = "enum_cowboys"
    ...
    ...     class Status(enum.IntEnum):
    ...         FARMER = 0
    ...         COWBOY = 1
    ...         SHERIF = 2
    ...
    ...     status = sheraf.EnumAttribute(Status, sheraf.IntegerAttribute())
    ...
    >>> with sheraf.connection(commit=True):
    ...     george = Cowboy.create(status=Cowboy.Status.SHERIF)
    ...
    ...     assert george.status == 2
    ...     assert george.status == Cowboy.Status.SHERIF
    ...
    >>> with sheraf.connection(commit=True):
    ...     assert george.status.is_sherif
    ...     assert not george.status.is_farmer