The unit test 'tackerclient.tests.unit.osc.v1.test_vnflcm_op_occs.
TestListVnfLcmOp.test_take_action_with_filter' is failing with below
error message,
DEBUG: TypeError: Object of type 'FormatComplexDataColumn' is not
JSON serializable
Background:
In class TestListVnfLcmOp definition, "create_vnflcm_op_occs" function
is called and list of fake vnflcm op occs dictionary is store in
vnflcm_op_occs_obj.
Now this dictionary is used in two unit test cases "test_take_action"
and "test_take_action_with_filter".
In order to evaluate test results, in "test_take_action" test case,
"get_vnflcm_op_occ_data" function is called using "vnflcm_op_occs_obj"
which appends the data in dictionary.
Later this dictionary "vnflcm_op_occs_obj" is again used in
"test_take_action_with_filter".
Implementation:
This patch creates a separate list of fake vnflcm op occs dictionary for
both the test cases.
This issue has been impacting below reviews as well,
[1] https://review.opendev.org/c/openstack/python-tackerclient/+/636893
[2] https://review.opendev.org/c/openstack/python-tackerclient/+/781314
Closes-Bug: #1919350
Change-Id: I0d62f77cf5d1e9ec0b0a7c404abab83f97b708ba