Exemple #1
0
def test_getting_baseline_data_from_masters(basic_masters_dicts, project_info):
    master = JsonMaster(basic_masters_dicts, project_info)
    master.get_baseline_data()
    assert isinstance(master.bl_index, (dict, ))
    assert master.bl_index["ipdc_milestones"]["Sea of Tranquility"] == [0, 1]
    assert master.bl_index["ipdc_costs"]["Apollo 11"] == [0, 1, 0, 2]
    assert master.bl_index["ipdc_costs"]["Columbia"] == [0, 1, 0, 2]
Exemple #2
0
def test_get_current_project_names(basic_masters_dicts, project_info):
    master = JsonMaster(basic_masters_dicts, project_info)
    assert master.current_projects == [
        "Sea of Tranquility",
        "Apollo 11",
        "Apollo 13",
        "Falcon 9",
        "Columbia",
    ]
Exemple #3
0
def test_get_project_abbreviations(basic_masters_dicts, project_info):
    master = JsonMaster(basic_masters_dicts, project_info)
    assert master.abbreviations == {
        "Apollo 11": {"abb": "A11", "full name": "Apollo 11"},
        "Apollo 13": {"abb": "A13", "full name": "Apollo 13"},
        "Columbia": {"abb": "Columbia", "full name": "Columbia"},
        "Falcon 9": {"abb": "F9", "full name": "Falcon 9"},
        "Mars": {"abb": "Mars", "full name": "Mars"},
        "Pipe Dreaming": {"abb": "Pdream", "full name": "Pipe Dreaming"},
        "Piping Hot": {"abb": "PH", "full name": "Piping Hot"},
        "Put That in Your Pipe": {"abb": "PtiYP", "full name": "Put That in Your Pipe"},
        "Sea of Tranquility": {"abb": "SoT", "full name": "Sea of Tranquility"},
    }
Exemple #4
0
def test_getting_project_groups(project_info, basic_masters_dicts):
    m = JsonMaster(basic_masters_dicts, project_info)
    assert isinstance(m.project_stage, (dict, ))
    assert isinstance(m.dft_groups, (dict, ))
Exemple #5
0
def test_creation_of_top250_master_json_file(top35_master, top35_project_info,
                                             top35_master_json_path):
    m = JsonMaster(top35_master, top35_project_info, data_type="top35")
    JsonData(m, top35_master_json_path)
Exemple #6
0
def test_creation_of_masters_class(basic_masters_dicts, project_info):
    master = JsonMaster(basic_masters_dicts, project_info)
    assert isinstance(master.master_data, (list, ))
Exemple #7
0
def test_json_master_save(full_test_masters_dict, project_info,
                          master_json_path):
    master = JsonMaster(full_test_masters_dict, project_info)
    master.get_baseline_data()
    JsonData(master, master_json_path)