def test_dict_to_list_no_fields():
    input = {
        "1234": {
        }
    }
    assert get_app_states_from_registry(input) == {
        "1234": LocalGameState.None_
    }
Exemple #2
0
def test_values_as_string():
    input = {
        "1234": {
            "running": "1",
            "installed": "1",
        }
    }
    assert get_app_states_from_registry(input) == {
        "1234": LocalGameState.Installed | LocalGameState.Running
    }
Exemple #3
0
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
    }
Exemple #4
0
def test_dict_to_list_running():
    input = {
        "1234": {
            "running": 1,
            "inStaLleD": 0,
        }
    }
    assert get_app_states_from_registry(input) == {
        "1234": LocalGameState.Running
    }
Exemple #5
0
def test_dict_to_list_no_none():
    input = {
        "1234": {
            "running": 0,
            "installed": 0,
        }
    }
    assert get_app_states_from_registry(input) == {
        "1234": LocalGameState.None_
    }
Exemple #6
0
def test_dict_to_list_empty():
    assert get_app_states_from_registry({}) == {}