oslo_policy.policy.Enforcer is initialised from the global config before the TestCase.setUp is called, which sets up policy_file in the config fixture.
So the Enforcer's policy_file just has 'policy.json' without the full path that is set up too late.
Ok found the problem, I think.
oslo_policy. policy. Enforcer is initialised from the global config before the TestCase.setUp is called, which sets up policy_file in the config fixture.
So the Enforcer's policy_file just has 'policy.json' without the full path that is set up too late.