def test__deep_load_no_response(mock_send, mock_created): mock_created.return_value = True vf = Vf() vf.identifier = "1234" vf._version = "4567" vf._status = const.CHECKED_IN mock_send.return_value = {} vf.deep_load() assert vf._unique_identifier is None mock_send.assert_called_once_with( 'GET', 'Deep Load Vf', "{}/sdc1/feProxy/rest/v1/screen?excludeTypes=VFCMT&excludeTypes=Configuration" .format(vf.base_front_url), headers=headers_sdc_creator(vf.headers))
def test__deep_load_response_NOK_under_cert(mock_send, mock_created): mock_created.return_value = True vf = Vf() vf.identifier = "5678" vf._version = "4567" vf._status = const.UNDER_CERTIFICATION mock_send.return_value = { 'resources': [{ 'uuid': '5689', 'name': 'test', 'uniqueId': '71011' }] } vf.deep_load() assert vf._unique_identifier is None mock_send.assert_called_once_with( 'GET', 'Deep Load Vf', "{}/sdc1/feProxy/rest/v1/screen?excludeTypes=VFCMT&excludeTypes=Configuration" .format(vf.base_front_url), headers=headers_sdc_tester(vf.headers))