Upgrade black to 20.8b1 (#39287)
This commit is contained in:
parent
0d7eec710c
commit
1c2ebdf307
574 changed files with 4389 additions and 1725 deletions
|
@ -149,12 +149,18 @@ def test_find_unserializable_data():
|
|||
|
||||
bad_data = object()
|
||||
|
||||
assert find_paths_unserializable_data(
|
||||
[State("mock_domain.mock_entity", "on", {"bad": bad_data})],
|
||||
dump=partial(dumps, cls=MockJSONEncoder),
|
||||
) == {"$[0](state: mock_domain.mock_entity).attributes.bad": bad_data}
|
||||
assert (
|
||||
find_paths_unserializable_data(
|
||||
[State("mock_domain.mock_entity", "on", {"bad": bad_data})],
|
||||
dump=partial(dumps, cls=MockJSONEncoder),
|
||||
)
|
||||
== {"$[0](state: mock_domain.mock_entity).attributes.bad": bad_data}
|
||||
)
|
||||
|
||||
assert find_paths_unserializable_data(
|
||||
[Event("bad_event", {"bad_attribute": bad_data})],
|
||||
dump=partial(dumps, cls=MockJSONEncoder),
|
||||
) == {"$[0](event: bad_event).data.bad_attribute": bad_data}
|
||||
assert (
|
||||
find_paths_unserializable_data(
|
||||
[Event("bad_event", {"bad_attribute": bad_data})],
|
||||
dump=partial(dumps, cls=MockJSONEncoder),
|
||||
)
|
||||
== {"$[0](event: bad_event).data.bad_attribute": bad_data}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue