| tests/services/test_market_state_etf.py:574: in test_flip_confluence_short_firm_buys_bear_1x
|
| d = mse.flip_account("cuixia", DAY, NOW, "down", execute=True)
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| wired = namespace(db=<test_market_state_etf._FakeDB object at 0x125502a80>, broker=<test_market_state_etf._FakeBroker object a...exit=<MagicMock name='record_exit' id='4920982512'>, gate=<MagicMock name='short_support_gate_allows' id='4920980688'>)
|
| rtrader/services/market_state_etf.py:1056: in flip_account
|
| f"-{broker.account_id()}-{now_et.strftime('%Y%m%dT%H%M%S')}")
|
| ^^^^^^^^^^^^^^^^^
|
| E AttributeError: '_FakeBroker' object has no attribute 'account_id'
|
| account_nick = 'cuixia'
|
| acct_long_only = False
|
| action = 'flip'
|
| allow = True
|
| base_pct = 0.3
|
| bear = 'TZA'
|
| before_cutoff = False
|
| block_reason = ''
|
| blocked = False
|
| broker = <test_market_state_etf._FakeBroker object at 0x125503740>
|
| bull = 'TNA'
|
| cdec = {'agree': True, 'decision': 'SHORT', 'leg': 'bear', 'llm': None, ...}
|
| conf = 3
|
| day = datetime.date(2026, 7, 6)
|
| dbf = <function wired.<locals>.<lambda> at 0x125589800>
|
| decision = {'account_nick': 'cuixia', 'action': 'flip', 'bear': 'TZA', 'before_cutoff': False, ...}
|
| direction = 'down'
|
| eff_pct = 0.3
|
| entry_coid = ''
|
| entry_px = 4.0
|
| equity = 30000.0
|
| execute = True
|
| held_pos = None
|
| hl = None
|
| is_manual = False
|
| long_on = True
|
| manual_size_mult = 1.0
|
| mode = 'confluence'
|
| now_et = datetime.datetime(2026, 7, 6, 13, 45, tzinfo=zoneinfo.ZoneInfo(key='America/New_York'))
|
| origin = 'live'
|
| positions = []
|
| realized = 0.0
|
| sec = 8100.0
|
| shares = 2250
|
| short_on = True
|
| size_mult = 1.0
|
| size_reason = 'mechanical:short'
|
| support_gate = {'blocked': False, 'reason': 'test-allow'}
|
| target_leg = 'bear'
|
| target_sym = 'TZA'
|