Collection._registry returning all empty fields in test mode - Django

Feature(s) impacted

Collection and specifically its _registry attribute are returning all empty in test in Django using PyTest. This is making it impossible to build and implement hooks.

Observed behavior

Trying to load hooks to unit test them is throwing a 400 in the HTTP response. This is because of the exception raised as there are no registered actions.

Expected behavior

One would expect that the schema is registered appropriately under test. Either that, or relevant documentation be provided. I will investigate manual setup in the forest admin GitHub repo.

Hello @lucasob,

The _registry is built by the init_forest method.
You need to run it in your env test to access _registry, serializers etc.