def test_distributed_not_distributed(mock_send):
    mock_send.return_value = {
        'distributionStatusList': [{
            'omfComponentID': "SO",
            'status': "DOWNLOAD_OK"
        }, {
            'omfComponentID': "aai",
            'status': "DOWNLOAD_OK"
        }]
    }
    svc = Service()
    svc.distribution_id = "12"
    assert not svc.distributed
    mock_send.assert_called_once_with(
        'GET',
        'Check distribution for ONAP-test-Service',
        'https://sdc.api.fe.simpledemo.onap.org:30207/sdc1/feProxy/rest/v1/catalog/services/distribution/12',
        headers=headers_sdc_creator(svc.headers))
def test_distributed_no_result(mock_send):
    mock_send.return_value = {}
    svc = Service()
    svc.distribution_id = "12"
    assert not svc.distributed
def test_distribution_id_setter():
    svc = Service()
    svc.identifier = "1234"
    svc.distribution_id = "4567"
    assert svc._distribution_id == "4567"