def test_dict_to_list_no_fields(): input = { "1234": { } } assert get_app_states_from_registry(input) == { "1234": LocalGameState.None_ }
def test_values_as_string(): input = { "1234": { "running": "1", "installed": "1", } } assert get_app_states_from_registry(input) == { "1234": LocalGameState.Installed | LocalGameState.Running }
def test_dict_to_list_installed_and_running(): input = { "1234": { "Running": 1, "inStaLleD": 1, } } assert get_app_states_from_registry(input) == { "1234": LocalGameState.Installed | LocalGameState.Running }
def test_dict_to_list_running(): input = { "1234": { "running": 1, "inStaLleD": 0, } } assert get_app_states_from_registry(input) == { "1234": LocalGameState.Running }
def test_dict_to_list_no_none(): input = { "1234": { "running": 0, "installed": 0, } } assert get_app_states_from_registry(input) == { "1234": LocalGameState.None_ }
def test_dict_to_list_empty(): assert get_app_states_from_registry({}) == {}