Skip to content

Commit d93fc59

Browse files
committed
[Tests] Add missing fixtures for API compliance suite
A couple of `initialize` tests can now support fixtures. For some time we only had one setting for BAL, so presumably that was why some tests were legitimately skipped(?) Though some tests were clearly skipped in error, and one test simply doesn't exist in the API compliance suite (`test_when_settings_expanded_then_manager_settings_updated`). One of the `getWithRelationship[s][Paged]` test cases was entirely missing fixtures, which was clearly a mistake. Signed-off-by: David Feltell <[email protected]>
1 parent ba853eb commit d93fc59

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

RELEASE_NOTES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ v1.0.0-alpha.x
1818
default of `bal` using the `entity_reference_url_scheme` setting.
1919
This must be set to a simple alphanumeric string.
2020

21+
### Bug fixes
22+
23+
- Added missing fixtures for the `openassetio.test.manager` API
24+
compliance suite test harness.
25+
[#61](https://github.com/OpenAssetIO/OpenAssetIO-Manager-BAL/pull/61)
26+
27+
2128
v1.0.0-alpha.9
2229
--------------
2330

tests/fixtures.py

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
test_library_path = os.path.join(
3232
os.path.dirname(__file__), "resources", "library_apiComplianceSuite.json"
3333
)
34+
blank_library_path = os.path.join(os.path.dirname(__file__), "resources", "library_empty.json")
3435
test_libray = {}
3536

3637
with open(test_library_path, "r", encoding="utf-8") as file:
@@ -90,14 +91,24 @@
9091
}
9192
},
9293
"Test_initialize": {
93-
"shared": {
94+
"test_when_settings_have_all_keys_then_all_settings_updated": {
95+
"some_settings_with_all_keys": {
96+
"library_path": blank_library_path,
97+
"simulated_query_latency_ms": 0,
98+
"entity_reference_url_scheme": "thingy",
99+
}
100+
},
101+
"test_when_settings_have_invalid_keys_then_all_settings_unchanged": {
102+
"some_settings_with_new_values_and_invalid_keys": {"library_path": "", "cat": True}
103+
},
104+
"test_when_settings_have_invalid_keys_then_raises_KeyError": {
94105
"some_settings_with_new_values_and_invalid_keys": {"library_path": "", "cat": True}
95106
},
96-
"test_when_settings_expanded_then_manager_settings_updated": {
97-
"some_settings_with_all_keys": {"library_path": ""}
107+
"test_when_settings_have_subset_of_keys_then_other_settings_unchanged": {
108+
"some_settings_with_a_subset_of_keys": {"simulated_query_latency_ms": 2}
98109
},
99110
"test_when_subset_of_settings_modified_then_other_settings_unchanged": {
100-
"some_settings_with_a_subset_of_keys": {}
111+
"some_settings_with_a_subset_of_keys": {"simulated_query_latency_ms": 2}
101112
},
102113
},
103114
"Test_entityExists": {
@@ -138,6 +149,10 @@
138149
"a_reference": RELATEABLE_REF,
139150
"a_relationship_trait_set": known_relationship_traitset,
140151
},
152+
"test_when_batched_then_same_number_of_returned_relationships": {
153+
"a_reference": RELATEABLE_REF,
154+
"a_relationship_trait_set": known_relationship_traitset,
155+
},
141156
"test_when_relationship_trait_set_known_then_all_with_trait_set_returned": {
142157
"a_reference": RELATEABLE_REF,
143158
"a_relationship_trait_set": known_relationship_traitset,

0 commit comments

Comments
 (0)