Comment 6 for bug 1520383

Revision history for this message
Lance Bragstad (lbragstad) wrote : Re: Tests that need policy.json can never find it

Hi Julian,

The keystone unit tests set most of this stuff up in keystone/tests/unit/core.py, where it defines the location for various testing files [0] [1]. There are static methods available for accessing testing files as well [2]. The test_policy.py module in keystone has examples on how to access the policy file for testing in case you haven't used that as a reference yet [3].

Do you have a patch up for review we could look at? Let me know if this helps clear things up.

[0] https://github.com/openstack/keystone/blob/8dd27d3368ce0aa396386010f6aec5ed6304d687/keystone/tests/unit/core.py#L64-L70
[1] https://github.com/openstack/keystone/blob/8dd27d3368ce0aa396386010f6aec5ed6304d687/keystone/tests/unit/core.py#L95-L114
[2] https://github.com/openstack/keystone/blob/8dd27d3368ce0aa396386010f6aec5ed6304d687/keystone/tests/unit/core.py#L154
[3] https://github.com/openstack/keystone/blob/8dd27d3368ce0aa396386010f6aec5ed6304d687/keystone/tests/unit/test_policy.py#L199