Skip to content

__getitem__ of AsyncMock returns MagicMock instead of AsyncMock #105317

@darrikonn

Description

@darrikonn

Actual

info.context.data_loader["organization"] yields MagicMock

Expected

info.context.data_loader["organization"] yields AsyncMock

Test case

ipdb> info
<AsyncMock id='4411944080'>

ipdb> info.context
<AsyncMock name='mock.context' id='4593499664'>

ipdb> info.context.data_loader
<AsyncMock name='mock.context.data_loader' id='4591705360'>

ipdb> info.context.data_loader["organization"]
<MagicMock name='mock.context.data_loader.__getitem__()' id='4588173008'>

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions