diff --git a/apply-license.sh b/apply-license.sh new file mode 100755 index 0000000..3d6c0f7 --- /dev/null +++ b/apply-license.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +function apply_license { + temp_file=$(mktemp) + + cat << HEREDOC > $temp_file +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + +HEREDOC + + cat $1 >> $temp_file + + mv $temp_file $1 +} + + +FILES_1=$(find {pyrandall,tests} -type f -name "*.py") +FILES_2=$(find {pyrandall,examples} -type f -name "*.yaml") +for f in $FILES_1 $FILES_2; do + apply_license $f; +done diff --git a/examples/scenarios/http/simulate_200.yaml b/examples/scenarios/http/simulate_200.yaml index 5187c9e..a5c058f 100644 --- a/examples/scenarios/http/simulate_200.yaml +++ b/examples/scenarios/http/simulate_200.yaml @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + --- version: scenario/v2 feature: diff --git a/examples/scenarios/http/simulate_400.yaml b/examples/scenarios/http/simulate_400.yaml index ad688a4..4f240d0 100644 --- a/examples/scenarios/http/simulate_400.yaml +++ b/examples/scenarios/http/simulate_400.yaml @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + --- version: scenario/v2 feature: diff --git a/examples/scenarios/http/validate_bad_status_code.yaml b/examples/scenarios/http/validate_bad_status_code.yaml index 17b4df1..ec7280e 100644 --- a/examples/scenarios/http/validate_bad_status_code.yaml +++ b/examples/scenarios/http/validate_bad_status_code.yaml @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + --- version: scenario/v2 feature: diff --git a/examples/scenarios/http/validate_ok_status_code.yaml b/examples/scenarios/http/validate_ok_status_code.yaml index 1f55eb4..0d2b730 100644 --- a/examples/scenarios/http/validate_ok_status_code.yaml +++ b/examples/scenarios/http/validate_ok_status_code.yaml @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + --- version: scenario/v2 feature: diff --git a/examples/scenarios/one_event.yaml b/examples/scenarios/one_event.yaml index 4778115..0ba9dcf 100644 --- a/examples/scenarios/one_event.yaml +++ b/examples/scenarios/one_event.yaml @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + --- version: scenario/v2 feature: diff --git a/examples/scenarios/v1.yaml b/examples/scenarios/v1.yaml index f13f5fc..5e0dd3b 100644 --- a/examples/scenarios/v1.yaml +++ b/examples/scenarios/v1.yaml @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + --- version: scenario/v1 scenario: diff --git a/examples/scenarios/v2.yaml b/examples/scenarios/v2.yaml index 1e07459..473650e 100644 --- a/examples/scenarios/v2.yaml +++ b/examples/scenarios/v2.yaml @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + --- version: scenario/v2 feature: diff --git a/examples/scenarios/v2_broker_kafka.yaml b/examples/scenarios/v2_broker_kafka.yaml index b683cf7..d41ed37 100644 --- a/examples/scenarios/v2_broker_kafka.yaml +++ b/examples/scenarios/v2_broker_kafka.yaml @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + version: scenario/v2 feature: description: Send a request and receive on a kafka topic diff --git a/examples/scenarios/v2_ingest_kafka_invalid.yaml b/examples/scenarios/v2_ingest_kafka_invalid.yaml index 9cdbc1a..eace6b5 100644 --- a/examples/scenarios/v2_ingest_kafka_invalid.yaml +++ b/examples/scenarios/v2_ingest_kafka_invalid.yaml @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + version: scenario/v2 feature: description: Send a request and receive on a kafka topic diff --git a/examples/scenarios/v2_ingest_kafka_small.yaml b/examples/scenarios/v2_ingest_kafka_small.yaml index ea68236..76bdf72 100644 --- a/examples/scenarios/v2_ingest_kafka_small.yaml +++ b/examples/scenarios/v2_ingest_kafka_small.yaml @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + version: scenario/v2 feature: description: Send a request and receive on a kafka topic diff --git a/examples/scenarios/v2_requests_http.yaml b/examples/scenarios/v2_requests_http.yaml index 211d31a..020046b 100644 --- a/examples/scenarios/v2_requests_http.yaml +++ b/examples/scenarios/v2_requests_http.yaml @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + --- version: scenario/v2 feature: diff --git a/pyrandall/__init__.py b/pyrandall/__init__.py index cdb40c2..85bffb2 100644 --- a/pyrandall/__init__.py +++ b/pyrandall/__init__.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 . import exceptions, types from .hookspecs import _hookimpl as hookimpl diff --git a/pyrandall/behaviors.py b/pyrandall/behaviors.py index f323aca..6f5f8b1 100644 --- a/pyrandall/behaviors.py +++ b/pyrandall/behaviors.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 json import pyrandall diff --git a/pyrandall/cli.py b/pyrandall/cli.py index d2cf647..e2dbe92 100644 --- a/pyrandall/cli.py +++ b/pyrandall/cli.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 json import sys from argparse import ArgumentParser diff --git a/pyrandall/commander.py b/pyrandall/commander.py index 0146b5c..9fa099c 100644 --- a/pyrandall/commander.py +++ b/pyrandall/commander.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 . import executors from .reporter import Reporter from .spec import Adapter diff --git a/pyrandall/exceptions.py b/pyrandall/exceptions.py index 77b1222..62db34e 100644 --- a/pyrandall/exceptions.py +++ b/pyrandall/exceptions.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + INVALID_VERSION_MSG = ( "Unsupported schema version for pyrandall. " "Please choose from: {}" ) diff --git a/pyrandall/executors/__init__.py b/pyrandall/executors/__init__.py index 1957158..6f8670b 100644 --- a/pyrandall/executors/__init__.py +++ b/pyrandall/executors/__init__.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 .broker_kafka import BrokerKafka from .common import Executor from .requests_http import RequestHttp, RequestHttpEvents diff --git a/pyrandall/executors/broker_kafka.py b/pyrandall/executors/broker_kafka.py index 38a0ba7..af3d5ae 100644 --- a/pyrandall/executors/broker_kafka.py +++ b/pyrandall/executors/broker_kafka.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 pyrandall.kafka import KafkaConn from pyrandall.types import Assertion, ExecutionMode, UnorderedDiffAssertion from .common import Executor diff --git a/pyrandall/executors/common.py b/pyrandall/executors/common.py index e50e910..263e2c7 100644 --- a/pyrandall/executors/common.py +++ b/pyrandall/executors/common.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 abc import ABC, abstractmethod diff --git a/pyrandall/executors/requests_http.py b/pyrandall/executors/requests_http.py index b21d015..12f8d34 100644 --- a/pyrandall/executors/requests_http.py +++ b/pyrandall/executors/requests_http.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 requests from pyrandall.types import Assertion diff --git a/pyrandall/hookspecs.py b/pyrandall/hookspecs.py index 941f6e1..e448d24 100644 --- a/pyrandall/hookspecs.py +++ b/pyrandall/hookspecs.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 sys import pluggy diff --git a/pyrandall/kafka.py b/pyrandall/kafka.py index e358004..083f8ef 100644 --- a/pyrandall/kafka.py +++ b/pyrandall/kafka.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 configparser import io import logging diff --git a/pyrandall/network.py b/pyrandall/network.py index cfb844c..084199d 100644 --- a/pyrandall/network.py +++ b/pyrandall/network.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 posixpath from urllib.parse import urljoin, urlparse diff --git a/pyrandall/rand.py b/pyrandall/rand.py index 12de26b..37893d6 100644 --- a/pyrandall/rand.py +++ b/pyrandall/rand.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 random import time diff --git a/pyrandall/reporter.py b/pyrandall/reporter.py index 4c9702f..e02ebb0 100644 --- a/pyrandall/reporter.py +++ b/pyrandall/reporter.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 jsondiff from pyrandall.types import Assertion, AssertionCall diff --git a/pyrandall/schemas/__init__.py b/pyrandall/schemas/__init__.py index e69de29..fa3d1a3 100644 --- a/pyrandall/schemas/__init__.py +++ b/pyrandall/schemas/__init__.py @@ -0,0 +1,15 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + diff --git a/pyrandall/schemas/scenario/__init__.py b/pyrandall/schemas/scenario/__init__.py index e69de29..fa3d1a3 100644 --- a/pyrandall/schemas/scenario/__init__.py +++ b/pyrandall/schemas/scenario/__init__.py @@ -0,0 +1,15 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + diff --git a/pyrandall/schemas/scenario/v1.yaml b/pyrandall/schemas/scenario/v1.yaml index d047695..a6ef10e 100644 --- a/pyrandall/schemas/scenario/v1.yaml +++ b/pyrandall/schemas/scenario/v1.yaml @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + $schema: http://json-schema.org/draft-04/schema# type: object required: [scenario, version, tests] diff --git a/pyrandall/schemas/scenario/v2.yaml b/pyrandall/schemas/scenario/v2.yaml index 0fe401a..4ba390d 100644 --- a/pyrandall/schemas/scenario/v2.yaml +++ b/pyrandall/schemas/scenario/v2.yaml @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + $schema: http://json-schema.org/draft-07/schema# type: object required: [version, feature] diff --git a/pyrandall/spec.py b/pyrandall/spec.py index ec89332..bd8a996 100644 --- a/pyrandall/spec.py +++ b/pyrandall/spec.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 os import re diff --git a/pyrandall/types.py b/pyrandall/types.py index ecca49d..0baf2c3 100644 --- a/pyrandall/types.py +++ b/pyrandall/types.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 enum import Enum, Flag, auto from typing import Any, Dict, List, NamedTuple diff --git a/tests/__init__.py b/tests/__init__.py index e69de29..fa3d1a3 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1,15 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + diff --git a/tests/conftest.py b/tests/conftest.py index 8a2ce34..cc13543 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 os import vcr diff --git a/tests/functional/__init__.py b/tests/functional/__init__.py index e69de29..fa3d1a3 100644 --- a/tests/functional/__init__.py +++ b/tests/functional/__init__.py @@ -0,0 +1,15 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + diff --git a/tests/functional/test_http_simulate.py b/tests/functional/test_http_simulate.py index c592b82..206bfa7 100644 --- a/tests/functional/test_http_simulate.py +++ b/tests/functional/test_http_simulate.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 unittest from unittest.mock import patch diff --git a/tests/functional/test_http_validate.py b/tests/functional/test_http_validate.py index 30a9a81..5af1206 100644 --- a/tests/functional/test_http_validate.py +++ b/tests/functional/test_http_validate.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 import pytest diff --git a/tests/functional/test_kafka_simulate.py b/tests/functional/test_kafka_simulate.py index 7384ecc..42c147e 100644 --- a/tests/functional/test_kafka_simulate.py +++ b/tests/functional/test_kafka_simulate.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 os import pytest from freezegun import freeze_time diff --git a/tests/functional/test_kafka_validate.py b/tests/functional/test_kafka_validate.py index 69695ff..bf159f8 100644 --- a/tests/functional/test_kafka_validate.py +++ b/tests/functional/test_kafka_validate.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 os import pytest from freezegun import freeze_time diff --git a/tests/helper.py b/tests/helper.py index 1689297..6ff27e1 100644 --- a/tests/helper.py +++ b/tests/helper.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 os import shlex import subprocess diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index e69de29..fa3d1a3 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -0,0 +1,15 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + diff --git a/tests/unit/test_assertion_unordered_diff.py b/tests/unit/test_assertion_unordered_diff.py index 51ebfb2..7cde315 100644 --- a/tests/unit/test_assertion_unordered_diff.py +++ b/tests/unit/test_assertion_unordered_diff.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 unittest.mock import MagicMock diff --git a/tests/unit/test_broker_kafka_executor.py b/tests/unit/test_broker_kafka_executor.py index b854c15..f4ec47b 100644 --- a/tests/unit/test_broker_kafka_executor.py +++ b/tests/unit/test_broker_kafka_executor.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 import pytest diff --git a/tests/unit/test_broker_kafka_validate.py b/tests/unit/test_broker_kafka_validate.py index 07832db..d533d3a 100644 --- a/tests/unit/test_broker_kafka_validate.py +++ b/tests/unit/test_broker_kafka_validate.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 unittest.mock import MagicMock diff --git a/tests/unit/test_commander.py b/tests/unit/test_commander.py index 9ce1c02..c0d2388 100644 --- a/tests/unit/test_commander.py +++ b/tests/unit/test_commander.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 import pytest diff --git a/tests/unit/test_network.py b/tests/unit/test_network.py index 795dcff..f0ab90e 100644 --- a/tests/unit/test_network.py +++ b/tests/unit/test_network.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 pyrandall.network import join_urlpath diff --git a/tests/unit/test_reporter.py b/tests/unit/test_reporter.py index 46b04fc..649f51c 100644 --- a/tests/unit/test_reporter.py +++ b/tests/unit/test_reporter.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 import pytest diff --git a/tests/unit/test_requests_http_simulate.py b/tests/unit/test_requests_http_simulate.py index 17578b1..9f10807 100644 --- a/tests/unit/test_requests_http_simulate.py +++ b/tests/unit/test_requests_http_simulate.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 import pytest diff --git a/tests/unit/test_requests_http_validate.py b/tests/unit/test_requests_http_validate.py index 2762393..94fb8e7 100644 --- a/tests/unit/test_requests_http_validate.py +++ b/tests/unit/test_requests_http_validate.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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, call, patch import pytest diff --git a/tests/unit/test_resultset.py b/tests/unit/test_resultset.py index e69de29..fa3d1a3 100644 --- a/tests/unit/test_resultset.py +++ b/tests/unit/test_resultset.py @@ -0,0 +1,15 @@ +# Copyright 2019 KPN N.V. +# +# 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. +# ========================================================================= + diff --git a/tests/unit/test_spec.py b/tests/unit/test_spec.py index 20cc844..fab66bb 100644 --- a/tests/unit/test_spec.py +++ b/tests/unit/test_spec.py @@ -1,3 +1,18 @@ +# Copyright 2019 KPN N.V. +# +# 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 pyrandall.spec import SpecBuilder