#389 Accept all possible `state` representation in `transition()` methods.
Merged by jkaluza. Opened by jkaluza.
jkaluza/freshmaker models-fix  into  master

Download 389.patch

One can for example pass EventState.COMPLETE, EventState.COMPLETE.value
or "complete" as a state in transition method.
We so far supported just passing the EventState.COMPLETE.value, but
some parts of code used EventState.COMPLETE.

In this commit, the transition methods are changed to support all
three ways.

This is here to fix broken tests from previous commit...

We want to update self.state_reason even if the self.state == state, so I'm moving that up.

Pull-Request has been merged by jkaluza

Metadata