strip_none#
- safir.testing.kubernetes.strip_none(model)#
- Strip - Nonevalues from a serialized Kubernetes object.- Comparing Kubernetes objects against serialized expected output is a bit of a pain, since Kubernetes objects often contain tons of optional parameters and the - to_dictserialization includes every parameter. The naive result is therefore tedious to read or understand.- This function works around this by taking a serialized Kubernetes object and dropping all of the parameters that are set to - None. The- to_dictform of a Kubernetes object should be passed through it first before comparing to the expected output.- Parmaters#- model
- Kubernetes model serialized with - to_dict.