Test client_cache file_client missing, gets repopulated
(file_client, react_wrap)
| 563 | |
| 564 | @pytest.mark.parametrize("file_client", ["runner", "wheel"]) |
| 565 | def test_client_cache_missing_key(file_client, react_wrap): |
| 566 | """ |
| 567 | Test client_cache file_client missing, gets repopulated |
| 568 | """ |
| 569 | client_cache = {} |
| 570 | tag = f"new_{file_client}" |
| 571 | chunk = LOW_CHUNKS[tag][0] |
| 572 | with patch.object(react_wrap, "client_cache", client_cache): |
| 573 | if f"{file_client}" == "runner": |
| 574 | react_wrap.runner(chunk) |
| 575 | elif f"{file_client}" == "wheel": |
| 576 | react_wrap.wheel(chunk) |
| 577 | else: |
| 578 | # catch need for new check |
| 579 | assert f"{file_client}" == "bad parameterization" |
| 580 | |
| 581 | file_client_key = None |
| 582 | for key in react_wrap.client_cache.keys(): |
| 583 | if key == f"{file_client}": |
| 584 | file_client_key = key |
| 585 | |
| 586 | assert file_client_key == f"{file_client}" |