Use a pd.DataFrame as the sentinel in test_totals_is_cached
This commit is contained in:
parent
f92fd35ce3
commit
e4711875ca
1 changed files with 2 additions and 1 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import datetime as dt
|
import datetime as dt
|
||||||
|
|
||||||
|
import pandas as pd
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from tests import config as test_config
|
from tests import config as test_config
|
||||||
|
|
@ -51,7 +52,7 @@ class TestProperties:
|
||||||
that is cached into `OrderHistory._data`, which must be unset first.
|
that is cached into `OrderHistory._data`, which must be unset first.
|
||||||
"""
|
"""
|
||||||
monkeypatch.setattr(order_history, "_data", None)
|
monkeypatch.setattr(order_history, "_data", None)
|
||||||
sentinel = object()
|
sentinel = pd.DataFrame()
|
||||||
monkeypatch.setattr(order_history, "aggregate_orders", lambda: sentinel)
|
monkeypatch.setattr(order_history, "aggregate_orders", lambda: sentinel)
|
||||||
|
|
||||||
result1 = order_history.totals
|
result1 = order_history.totals
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue