def test_submit_OK(mock_send, mock_load, mock_exists): """Don't update status if submission NOK.""" mock_exists.return_value = True vf = Vf() vf._status = const.COMMITED expected_data = '{\n "userRemarks": "certify"\n}' vf._version = "1234" vf._unique_identifier = "12345" vf.submit() mock_send.assert_called_once_with( "POST", "Certify Vf", 'https://sdc.api.fe.simpledemo.onap.org:30207/sdc1/feProxy/rest/v1/catalog/resources/12345/lifecycleState/Certify', data=expected_data)
def test__unique_identifier_no_load(mock_load): vf = Vf() vf.identifier = "1234" vf._unique_identifier = "toto" assert vf.unique_identifier == "toto" mock_load.assert_not_called()