'Tests that calling history in before_trading_start gets us the correct
values, which involves 1) calling data_portal.get_history_window as of
the previous market minute, 2) getting adjustments between the previous
market minute and the current time, and 3) applying those adjustments'

def test_old_new_history_bts_paths(self):

    algo = self.create_algo(history_bts_algo)
    algo.run(self.data_portal)
    expected_vol_without_split = (np.arange(386, 391) * 100)
    expected_vol_with_split = (np.arange(386, 391) * 200)
    window = algo.recorded_vars['history']
    np.testing.assert_array_equal(window[self.asset1].values, expected_vol_without_split)
    np.testing.assert_array_equal(window[self.asset2].values, expected_vol_without_split)
    np.testing.assert_array_equal(window[self.asset3].values, expected_vol_with_split)
