Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin-Molinero committed Oct 24, 2023
1 parent a922269 commit 676e522
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

namespace QuantConnect.Tests.Common.Data.Fundamental
{
internal class NullFundamentalDataProvider : IFundamentalDataProvider
public class NullFundamentalDataProvider : IFundamentalDataProvider
{
public T Get<T>(DateTime time, SecurityIdentifier securityIdentifier, FundamentalProperty name) => BaseFundamentalDataProvider.GetDefault<T>();
public void Initialize(IDataProvider dataProvider, bool liveMode)
Expand Down
4 changes: 3 additions & 1 deletion Tests/Research/QuantBookFundamentalTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
using QuantConnect.Data.Fundamental;
using QuantConnect.Data.UniverseSelection;
using QuantConnect.Tests.Common.Data.Fundamental;
using QuantConnect.Configuration;

namespace QuantConnect.Tests.Research
{
Expand All @@ -47,6 +48,8 @@ public void Setup()
SymbolCache.Clear();
MarketHoursDatabase.Reset();

Config.Set("fundamental-data-provider", "NullFundamentalDataProvider");

// Using a date that we have data for in the repo
_startDate = new DateTime(2014, 3, 31);
_endDate = new DateTime(2014, 3, 31);
Expand Down Expand Up @@ -153,7 +156,6 @@ public void PyReturnNoneTest()
{
using (Py.GIL())
{
FundamentalService.Initialize(TestGlobals.DataProvider, new NullFundamentalDataProvider(), false);
var start = new DateTime(2023, 10, 10);
var symbol = Symbol.Create("AIG", SecurityType.Equity, Market.USA);
var testModule = _module.FundamentalHistoryTest();
Expand Down

0 comments on commit 676e522

Please sign in to comment.