def test_reset_group_and_pairs_to_default_correctly_identifies_maximum_number_of_periods_for_multiple_runs( self): self.context.current_runs = [62260, 62261, 62263] model = GroupingTabModel(self.context) model.reset_groups_and_pairs_to_default() self.context.group_pair_context.reset_group_and_pairs_to_default.assert_called_once_with( mock.ANY, mock.ANY, mock.ANY, 4)
def test_reset_group_and_pairs_to_default_correctly_identifies_maximum_number_of_periods_for_single_run( self): self.context.current_runs = [62260] model = GroupingTabModel(self.context) status = model.reset_groups_and_pairs_to_default() self.assertEquals(status, "success") self.context.group_pair_context.reset_group_and_pairs_to_default.assert_called_once_with( mock.ANY, mock.ANY, mock.ANY, 4)
def test_reset_group_and_pairs_to_default_for_no_loaded_runs(self): self.context.current_runs = [] model = GroupingTabModel(self.context) status = model.reset_groups_and_pairs_to_default() self.assertEquals(status, "failed")