def test_schedule_dashboard(master, dashboard_template): milestones = MilestoneData(master, baseline=["all"], group=[master.current_projects]) milestones.filter_chart_info(milestone_type=["Approval", "Delivery"]) wb = schedule_dashboard(master, milestones, dashboard_template) wb.save("resources/test_dashboards_master_altered.xlsx")
def test_compile_milestone_chart_with_filter(master): milestones = MilestoneData(master, group=[SOT], quarter=["Q4 19/20", "Q4 18/19"]) milestones.filter_chart_info(dates=["1/1/2013", "1/1/2014"]) milestone_chart( milestones, master, title="Group Test", blue_line="Today", chart=False, )
def test_removing_project_name_from_milestone_keys(master): """ The standard list contained with in the sorted_milestone_dict is {"names": ["Project Name, Milestone Name, ...]. When there is only one project in the dictionary the need for a Project Name is obsolete. The function remove_project_name_from_milestone_key, removes the project name and returns milestone name only. """ milestones = MilestoneData(master, group=[SOT], baseline=["all"]) milestones.filter_chart_info(dates=["1/1/2013", "1/1/2014"]) key_names = milestones.sorted_milestone_dict["current"]["names"] # key_names = remove_project_name_from_milestone_key("SoT", key_names) assert key_names == [ "Sputnik Radiation", "Lunar Magma", "Standard B", "Standard C", "Mercury Eleven", "Tranquility Radiation", ]
def test_putting_milestones_into_wb(master): milestones = MilestoneData(master, group=[SOT], baseline=["all"]) milestones.filter_chart_info(dates=["1/1/2013", "1/1/2014"]) wb = put_milestones_into_wb(milestones) wb.save("resources/milestone_data_output_test.xlsx")