def test_channel_update(client): """Test the return value of the update methods. It doesn't test the actual update itself. TODO: See if this is worth testing since we're using a mocking backend """ channel = client.channels.create( types.ChannelDraft( key="test-channel", name=types.LocalizedString(nl="nl-channel"), roles=[types.ChannelRoleEnum.INVENTORY_SUPPLY], )) assert channel.key == "test-channel" channel = client.channels.update_by_id( id=channel.id, version=channel.version, actions=[ types.ChannelChangeNameAction(name=types.LocalizedString( nl="nl-channel2")) ], )
def post_load(self, data, **kwargs): del data["action"] return types.ChannelChangeNameAction(**data)