Make set_value a method within Serializer (#8001)

* Make set_value a static method for Serializers

As an alternative to #7671, let the method be overridden if needed. As
the function is only used for serializers, it has a better place in the
Serializer class.

* Set `set_value` as an object (non-static) method

* Add tests for set_value()

These tests follow the examples given in the method.
This commit is contained in:
Étienne Beaulé 2023-05-24 10:59:42 -03:00 committed by Saadullah Aleem
parent 869d46fc42
commit f969143c95