test: Missing duplicates tests in test_receiver.py (#11413)

This commit is contained in:
dustinface 2022-05-05 17:16:33 +02:00 committed by GitHub
parent 629c303077
commit 2d0d8e175e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -218,6 +218,7 @@ async def test_reset() -> None:
receiver._last_sync = dataclasses.replace(receiver._current_sync)
receiver._invalid = ["1"]
receiver._keys_missing = ["1"]
receiver._duplicates = ["1"]
receiver._last_sync.sync_id = uint64(1)
# Call `reset` and make sure all expected values are set back to their defaults.
@ -237,6 +238,7 @@ async def test_to_dict(counts_only: bool) -> None:
assert get_list_or_len(plot_sync_dict_1["plots"], not counts_only) == 10
assert get_list_or_len(plot_sync_dict_1["failed_to_open_filenames"], not counts_only) == 0
assert get_list_or_len(plot_sync_dict_1["no_key_filenames"], not counts_only) == 0
assert get_list_or_len(plot_sync_dict_1["duplicates"], not counts_only) == 0
assert plot_sync_dict_1["total_plot_size"] == sum(plot.file_size for plot in receiver.plots().values())
assert plot_sync_dict_1["syncing"] is None
assert plot_sync_dict_1["last_sync_time"] is None