def test_chart_states_list_lengths(): """Test chart state function lists are same length.""" jd = JobData('test') jd.count_states() one, two = jd.chart_states()[0], jd.chart_states()[1] assert len(one) == len(two)
def test_chart_states_returns_list(): """Test the chart state function returns list.""" jd = JobData('test') jd.count_states() assert isinstance(jd.chart_states(), list)
def test_count_state_dict_property_is_updated(): """Test the count states method updates the state dict property.""" jd = JobData('test') states = jd.count_states() assert jd.state_dict == states
def test_count_states_method_returns_dict(): """Test the count states method returns a dictionary.""" jd = JobData('test') assert isinstance(jd.count_states(), dict)
def test_week_removed_from_time(): """Test week is removed from times that have w.""" jd = JobData('test') state_dict = jd.count_states() key_list = list(state_dict.values()) assert 'w' not in key_list
def test_hour_removed_from_time(): """Test hour is removed from times that have h.""" jd = JobData('test') state_dict = jd.count_states() key_list = list(state_dict.values()) assert 'h' not in key_list