There is no available initial state for the content type while testing
See original GitHub issueWhen I create an integration test, I create objects in the DB for which I have defined a state field.
p = Procedure.objects.create()
In django admin I defined 4 states, and 3 transitions
So I understood from the documentation that since CREATED is never a destination state, django-river would have guessed that this was the initial state.
But I get this error:
raise RiverException(ErrorCode.NO_AVAILABLE_INITIAL_STATE, 'There is no available initial state for the content type %s. ' % self._content_type)
river.utils.exceptions.RiverException: There is no available initial state for the content type procedure.
I’m completely lost, as I understand that this is common but I haven’t find a solution, also looking at similar issues.
Any idea?
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Bad state: Cannot set the body fields of a Request with content ...
If it's a String, it's encoded using [encoding] and used as the body of the request. The content-type of the request will default...
Read more >Streaming in an Arduino Sketch - Initial State
Github repo and detailed documentation can be found here: https://github.com/InitialState/arduino_streamers Each of the following example...
Read more >Testing - Django REST framework
REST framework includes a few helper classes that extend Django's existing test framework, and improve support for making API requests.
Read more >Testing REST Endpoints Using REST Assured - Semaphore CI
In this tutorial, we will deal with functional tests that do not ... There are many Java libraries that allow us to write...
Read more >ActivityScenario | Android Developers
ActivityScenario provides APIs to start and drive an Activity's lifecycle state for testing. It works with arbitrary activities and works ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
thanks! however setting the field fixed the error, so all tests now run
Here I created another issue for that. Let’s discuss it over there. Please don’t use this issue. If you have another issue feel free to create a new one for it.
https://github.com/javrasya/django-river/issues/77