mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Added more complex test for deeper alternative site tree
This commit is contained in:
parent
2c11147067
commit
687f769242
1 changed files with 18 additions and 0 deletions
|
|
@ -42,5 +42,23 @@ class TestModuleApi(ModuleUnitTest):
|
|||
"studio2": {"studio", "SFTP"}}
|
||||
assert ret == expected, "Not matching result"
|
||||
|
||||
def test_get_alt_site_pairs_deep(self, setup_sync_server_module):
|
||||
conf_sites = {"A": {"alternative_sites": ["C"]},
|
||||
"B": {"alternative_sites": ["C"]},
|
||||
"C": {"alternative_sites": ["D"]},
|
||||
"D": {"alternative_sites": ["A"]},
|
||||
"F": {"alternative_sites": ["G"]},
|
||||
"G": {"alternative_sites": ["F"]},
|
||||
}
|
||||
|
||||
ret = setup_sync_server_module._get_alt_site_pairs(conf_sites)
|
||||
expected = {"A": {"B", "C", "D"},
|
||||
"B": {"A", "C", "D"},
|
||||
"C": {"A", "B", "D"},
|
||||
"D": {"A", "B", "C"},
|
||||
"F": {"G"},
|
||||
"G": {"F"}}
|
||||
assert ret == expected, "Not matching result"
|
||||
|
||||
|
||||
test_case = TestModuleApi()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue