Skip to content

Dynamic assertion on dict does not work with an 'update' key #105

@phillipuniverse

Description

@phillipuniverse

Example:

dict = {'update', True}

assert_that(dict).has_update(True)

Looks like the call to get_attr at

val_attr = getattr(self.val, attr_name)
returns the dict update method instead of the actual attribute contained within the dict.

There is already some checking in this method for is_dict, maybe solve this edge case by using that and hardcoding the value retrieval.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions