aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichal Jagiello <michal.jagiello@t-mobile.pl>2022-07-12 09:52:01 +0000
committerMichal Jagiello <michal.jagiello@t-mobile.pl>2022-07-18 09:49:01 +0000
commit0a7c213c87d9b0916080d62d8e97ac4d47851688 (patch)
tree4599fc1da6a74decdd789f70d01b057e8f426308 /tests
parentdc0b8a7349225066f0e8e55c8decc0049696b21f (diff)
[CPS] Create CPS resources using data provider0.7.0
Create: - dataspace - anchor - schema set Issue-ID: INT-2135 Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl> Change-Id: I49fa9aa34bd4157372571275774c6a410d1bedcb
Diffstat (limited to 'tests')
-rw-r--r--tests/test_aai_service_resource.py15
-rw-r--r--tests/test_cloud_region_resource.py15
-rw-r--r--tests/test_complex_resource.py15
-rw-r--r--tests/test_config_loader.py14
-rw-r--r--tests/test_config_parser.py15
-rw-r--r--tests/test_cps_resource.py164
-rw-r--r--tests/test_customer_resource.py15
-rw-r--r--tests/test_data_dictionary_resource.py17
-rw-r--r--tests/test_esr_resource.py15
-rw-r--r--tests/test_line_of_business_resource.py15
-rw-r--r--tests/test_owning_entity_resource.py15
-rw-r--r--tests/test_platform_resource.py15
-rw-r--r--tests/test_pnf_resource.py15
-rw-r--r--tests/test_project_resource.py15
-rw-r--r--tests/test_resource_creator.py15
-rw-r--r--tests/test_service_instance_resource.py15
-rw-r--r--tests/test_service_resource.py15
-rw-r--r--tests/test_tag_handlers.py15
-rw-r--r--tests/test_tenant_resource.py15
-rw-r--r--tests/test_validator.py15
-rw-r--r--tests/test_vendor_resource.py15
-rw-r--r--tests/test_versions.py15
-rw-r--r--tests/test_vnf_resource.py15
-rw-r--r--tests/test_vsp_resource.py15
24 files changed, 509 insertions, 1 deletions
diff --git a/tests/test_aai_service_resource.py b/tests/test_aai_service_resource.py
index 9056299..22af4ef 100644
--- a/tests/test_aai_service_resource.py
+++ b/tests/test_aai_service_resource.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from unittest.mock import patch, PropertyMock
from onap_data_provider.resources.aai_service_resource import AaiService, AaiServiceResource, ResourceNotFound
diff --git a/tests/test_cloud_region_resource.py b/tests/test_cloud_region_resource.py
index 303e1c3..e9e4974 100644
--- a/tests/test_cloud_region_resource.py
+++ b/tests/test_cloud_region_resource.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from pathlib import Path
from unittest.mock import MagicMock, patch, PropertyMock
diff --git a/tests/test_complex_resource.py b/tests/test_complex_resource.py
index 441b37c..3c84620 100644
--- a/tests/test_complex_resource.py
+++ b/tests/test_complex_resource.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from unittest.mock import patch, PropertyMock
from onapsdk.aai.cloud_infrastructure.complex import Complex
diff --git a/tests/test_config_loader.py b/tests/test_config_loader.py
index c10e329..5574e09 100644
--- a/tests/test_config_loader.py
+++ b/tests/test_config_loader.py
@@ -1,4 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from pathlib import Path
from onap_data_provider.config_loader import ConfigLoader
diff --git a/tests/test_config_parser.py b/tests/test_config_parser.py
index dc118c9..d7eaa4d 100644
--- a/tests/test_config_parser.py
+++ b/tests/test_config_parser.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from pathlib import Path
from onap_data_provider.resources.cloud_region_resource import CloudRegionResource
diff --git a/tests/test_cps_resource.py b/tests/test_cps_resource.py
new file mode 100644
index 0000000..2e01ad6
--- /dev/null
+++ b/tests/test_cps_resource.py
@@ -0,0 +1,164 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
+from unittest.mock import MagicMock, NonCallableMagicMock, patch, PropertyMock
+
+from onapsdk.exceptions import APIError, ResourceNotFound
+from pytest import raises
+
+from onap_data_provider.resources.cps_resource import AnchorResource, DataspaceResource, SchemaSetResource
+
+
+DATASPACE_RESOURCE_DATA = {
+ "dataspace-name": "test-dataspace-resource",
+}
+
+DATASPACE_WITH_SCHEMASETS_DATA = {
+ "dataspace-name": "test-dataspace-resource",
+ "schema-sets": [
+ {
+ "schema-set-name": "test-schema-set",
+ "schema-set-file": "test-schema-set-file"
+ }
+ ]
+}
+
+DATASPACE_WITH_ANCHORS_DATA = {
+ "dataspace-name": "test-dataspace-resource",
+ "anchors": [
+ {
+ "anchor-name": "test-anchor",
+ "schema-set-name": "test-schema-set"
+ }
+ ]
+}
+
+SCHEMA_SET_DATA = {
+ "schema-set-name": "test-schema-set",
+ "dataspace-name": "test-dataspace",
+ "schema-set-file": "test-schema-set-file"
+}
+
+ANCHOR_DATA = {
+ "anchor-name": "test-anchor",
+ "dataspace-name": "test-dataspace",
+ "schema-set-name": "test-schema-set"
+}
+
+
+@patch("onap_data_provider.resources.cps_resource.Dataspace")
+def test_dataspace_resource_create(mock_dataspace):
+ dr = DataspaceResource(DATASPACE_RESOURCE_DATA)
+ dr.create()
+ mock_dataspace.create.assert_called_once_with("test-dataspace-resource")
+ mock_dataspace.assert_not_called()
+
+ mock_dataspace.reset_mock()
+ mock_dataspace.create.side_effect = APIError("409 error")
+ dr.create()
+ mock_dataspace.create.assert_called_once_with("test-dataspace-resource")
+ mock_dataspace.assert_called_once_with("test-dataspace-resource")
+
+ mock_dataspace.reset_mock()
+ mock_dataspace.create.side_effect = APIError("404")
+ with raises(APIError):
+ dr.create()
+
+@patch("onap_data_provider.resources.cps_resource.Dataspace")
+def test_dataspace_resource_with_schemasets(mock_dataspace):
+ dr = DataspaceResource(DATASPACE_WITH_SCHEMASETS_DATA)
+ dr.create()
+ mock_dataspace.create.assert_called_once_with("test-dataspace-resource")
+ mock_dataspace.create.return_value.get_schema_set.assert_called_once_with("test-schema-set")
+ mock_dataspace.create.return_value.create_schema_set.assert_not_called()
+
+ mock_dataspace.reset_mock()
+ mock_dataspace.create.return_value.get_schema_set.side_effect = APIError("409 error")
+ with patch("builtins.open") as mock_open:
+ dr.create()
+ mock_dataspace.create.assert_called_once_with("test-dataspace-resource")
+ mock_dataspace.create.return_value.get_schema_set.assert_called_once_with("test-schema-set")
+ mock_dataspace.create.return_value.create_schema_set.assert_called_once()
+ mock_open.assert_called_once_with("test-schema-set-file", "rb")
+
+@patch("onap_data_provider.resources.cps_resource.Dataspace")
+def test_dataspace_resource_with_anchors(mock_dataspace):
+ dr = DataspaceResource(DATASPACE_WITH_ANCHORS_DATA)
+ dr.create()
+ mock_dataspace.create.assert_called_once_with("test-dataspace-resource")
+ mock_dataspace.create.return_value.get_anchor.assert_called_once_with("test-anchor")
+ mock_dataspace.create.return_value.create_anchor.assert_not_called()
+
+ mock_dataspace.reset_mock()
+ mock_dataspace.create.return_value.get_anchor.side_effect = APIError("409 error")
+ dr.create()
+ mock_dataspace.create.assert_called_once_with("test-dataspace-resource")
+ mock_dataspace.create.return_value.get_anchor.assert_called_once_with("test-anchor")
+ mock_dataspace.create.return_value.get_schema_set.assert_called_once_with("test-schema-set")
+ mock_dataspace.create.return_value.create_anchor.assert_called_once()
+
+@patch("onap_data_provider.resources.cps_resource.SchemaSetResource.dataspace", new_callable=PropertyMock)
+def test_schema_set_schema_set_property(mock_dataspace_property):
+ ssr = SchemaSetResource(SCHEMA_SET_DATA)
+
+ mock_dataspace_property.return_value.get_schema_set.side_effect = APIError("Dataspace not found")
+ with raises(ValueError):
+ ssr.schema_set
+
+ mock_dataspace_property.return_value.get_schema_set.side_effect = APIError("Schema Set not found")
+ assert ssr.schema_set is None
+
+ mock_dataspace_property.return_value.get_schema_set.side_effect = None
+ assert ssr.schema_set is not None
+
+@patch("onap_data_provider.resources.cps_resource.SchemaSetResource.schema_set", new_callable=PropertyMock)
+@patch("onap_data_provider.resources.cps_resource.SchemaSetResource.dataspace", new_callable=PropertyMock)
+def test_schema_set_resource(mock_dataspace_property, mock_schema_set_property):
+ ssr = SchemaSetResource(SCHEMA_SET_DATA)
+
+ mock_schema_set_property.side_effect = ValueError
+ with raises(ValueError):
+ ssr.create()
+
+ mock_schema_set_property.side_effect = None
+
+ with patch("builtins.open"):
+ ssr.create()
+ mock_dataspace_property.return_value.create_schema_set.assert_not_called()
+
+ mock_schema_set_property.return_value = None
+ with patch("builtins.open"):
+ ssr.create()
+ mock_dataspace_property.return_value.create_schema_set.assert_called_once()
+
+@patch("onap_data_provider.resources.cps_resource.AnchorResource.schema_set", new_callable=PropertyMock)
+@patch("onap_data_provider.resources.cps_resource.AnchorResource.dataspace", new_callable=PropertyMock)
+def test_anchor_resource(mock_dataspace_property, mock_schema_set_property):
+ ar = AnchorResource(ANCHOR_DATA)
+
+ mock_schema_set_property.side_effect = ValueError
+ with raises(ValueError):
+ ar.create()
+
+ mock_schema_set_property.side_effect = None
+ mock_schema_set_property.return_value = None
+ with raises(ValueError):
+ ar.create()
+
+ mock_schema_set_property.side_effect = None
+ mock_schema_set_property.return_value = MagicMock()
+ ar.create()
+ mock_dataspace_property.return_value.get_anchor.assert_called_once_with("test-anchor")
+ mock_dataspace_property.return_value.create_anchor.assert_not_called()
diff --git a/tests/test_customer_resource.py b/tests/test_customer_resource.py
index 23b51ef..c82b016 100644
--- a/tests/test_customer_resource.py
+++ b/tests/test_customer_resource.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from unittest.mock import MagicMock, patch, PropertyMock
from onap_data_provider.resources.customer_resource import CustomerResource
diff --git a/tests/test_data_dictionary_resource.py b/tests/test_data_dictionary_resource.py
index 31369f7..b9ea2fe 100644
--- a/tests/test_data_dictionary_resource.py
+++ b/tests/test_data_dictionary_resource.py
@@ -1,4 +1,19 @@
-from unittest.mock import patch, PropertyMock
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
+from unittest.mock import patch
from onapsdk.cds import DataDictionarySet
from onapsdk.exceptions import FileError
diff --git a/tests/test_esr_resource.py b/tests/test_esr_resource.py
index d6c8901..0339d2b 100644
--- a/tests/test_esr_resource.py
+++ b/tests/test_esr_resource.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from collections import namedtuple
from unittest.mock import MagicMock, patch, PropertyMock
diff --git a/tests/test_line_of_business_resource.py b/tests/test_line_of_business_resource.py
index 1a60e8f..3867a3f 100644
--- a/tests/test_line_of_business_resource.py
+++ b/tests/test_line_of_business_resource.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from unittest import mock
from onap_data_provider.resources.line_of_business_resource import (
diff --git a/tests/test_owning_entity_resource.py b/tests/test_owning_entity_resource.py
index c32351c..af6c299 100644
--- a/tests/test_owning_entity_resource.py
+++ b/tests/test_owning_entity_resource.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from unittest import mock
from onap_data_provider.resources.owning_entity_resource import (
diff --git a/tests/test_platform_resource.py b/tests/test_platform_resource.py
index eafbae4..642c32e 100644
--- a/tests/test_platform_resource.py
+++ b/tests/test_platform_resource.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from unittest import mock
from onap_data_provider.resources.platform_resource import (
diff --git a/tests/test_pnf_resource.py b/tests/test_pnf_resource.py
index 62dc3ae..c13ca55 100644
--- a/tests/test_pnf_resource.py
+++ b/tests/test_pnf_resource.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from unittest.mock import MagicMock, patch, PropertyMock
from onap_data_provider.resources.pnf_resource import PnfResource
diff --git a/tests/test_project_resource.py b/tests/test_project_resource.py
index c1ff167..70e6cd1 100644
--- a/tests/test_project_resource.py
+++ b/tests/test_project_resource.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from unittest import mock
from onap_data_provider.resources.project_resource import (
diff --git a/tests/test_resource_creator.py b/tests/test_resource_creator.py
index a8e62ed..156dd94 100644
--- a/tests/test_resource_creator.py
+++ b/tests/test_resource_creator.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
import pytest
from onap_data_provider.resources.cloud_region_resource import CloudRegionResource
diff --git a/tests/test_service_instance_resource.py b/tests/test_service_instance_resource.py
index 91e8860..1fc2af8 100644
--- a/tests/test_service_instance_resource.py
+++ b/tests/test_service_instance_resource.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from unittest.mock import MagicMock, patch, PropertyMock
from onap_data_provider.resources.service_instance_resource import (
diff --git a/tests/test_service_resource.py b/tests/test_service_resource.py
index 5a18f54..3f85f54 100644
--- a/tests/test_service_resource.py
+++ b/tests/test_service_resource.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from collections import namedtuple
from unittest.mock import patch, PropertyMock
diff --git a/tests/test_tag_handlers.py b/tests/test_tag_handlers.py
index c7c9ffc..d52626d 100644
--- a/tests/test_tag_handlers.py
+++ b/tests/test_tag_handlers.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from unittest.mock import patch, PropertyMock
import pytest
diff --git a/tests/test_tenant_resource.py b/tests/test_tenant_resource.py
index 2c89651..1e9da31 100644
--- a/tests/test_tenant_resource.py
+++ b/tests/test_tenant_resource.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from unittest.mock import MagicMock, patch, PropertyMock
from onap_data_provider.resources.tenant_resource import TenantResource
diff --git a/tests/test_validator.py b/tests/test_validator.py
index f0c7273..7da968d 100644
--- a/tests/test_validator.py
+++ b/tests/test_validator.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from pytest import raises
from jsonschema import ValidationError
diff --git a/tests/test_vendor_resource.py b/tests/test_vendor_resource.py
index 2a4d0aa..b4d93dc 100644
--- a/tests/test_vendor_resource.py
+++ b/tests/test_vendor_resource.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from unittest.mock import patch, PropertyMock
from onap_data_provider.resources.vendor_resource import VendorResource
diff --git a/tests/test_versions.py b/tests/test_versions.py
index 7571854..1a8ce0c 100644
--- a/tests/test_versions.py
+++ b/tests/test_versions.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
import warnings
from onap_data_provider.versions import VersionsEnum
diff --git a/tests/test_vnf_resource.py b/tests/test_vnf_resource.py
index e35cded..72af516 100644
--- a/tests/test_vnf_resource.py
+++ b/tests/test_vnf_resource.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from unittest.mock import MagicMock, patch, PropertyMock
from onap_data_provider.resources.vnf_resource import VnfResource
diff --git a/tests/test_vsp_resource.py b/tests/test_vsp_resource.py
index 9ad5bb6..5e2db23 100644
--- a/tests/test_vsp_resource.py
+++ b/tests/test_vsp_resource.py
@@ -1,3 +1,18 @@
+"""
+ Copyright 2022 Deutsche Telekom AG
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+"""
from unittest.mock import patch, PropertyMock
from onap_data_provider.resources.vsp_resource import VspResource