'Assert that a user can add their own custom algorithm.
This mocks out settings.ALGORITHMS and settings.CONSENSUS to use only a
single custom-defined function (alwaysTrue)'

@unittest.skip('Fails    inexplicable    in    certain    environments.')
@patch.object(algorithms, 'CONSENSUS')
@patch.object(algorithms, 'ALGORITHMS')
@patch.object(algorithms, 'time')
def test_run_selected_algorithm_runs_novel_algorithm(self, timeMock, algorithmsListMock, consensusMock):

    algorithmsListMock.__iter__.return_value = ['alwaysTrue']
    consensusMock = 1
    (timeMock.return_value, timeseries) = self.data(time())
    alwaysTrue = Mock(return_value=True)
    with patch.dict(algorithms.__dict__, {'alwaysTrue': alwaysTrue}):
        (result, ensemble, tail_avg) = algorithms.run_selected_algorithm(timeseries)
    alwaysTrue.assert_called_with(timeseries)
    self.assertTrue(result)
    self.assertEqual(ensemble, [True])
    self.assertEqual(tail_avg, 334)
