From e6607d611aeb21962e87907f85f8a84886b644e3 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Wed, 30 Oct 2019 17:48:59 +0100 Subject: [PATCH] Sanity test fixups - AWS related tests (#64093) * AWS tests Sanity Test fixups (add boilerplate) * Remove sanity ignore.txt entries --- .../inventory_diff.py | 3 ++ .../lib/boto/__init__.py | 3 ++ .../lib/boto/ec2/__init__.py | 3 ++ .../lib/boto/elasticache/__init__.py | 4 ++ .../lib/boto/exception.py | 3 ++ .../lib/boto/exceptions.py | 3 ++ .../lib/boto/mocks/instances.py | 3 ++ .../lib/boto/session.py | 3 ++ test/legacy/cleanup_ec2.py | 3 ++ test/sanity/ignore.txt | 47 ------------------- test/units/module_utils/ec2/test_aws.py | 17 ++----- test/units/module_utils/test_ec2.py | 18 ++----- .../cloud/amazon/test_aws_api_gateway.py | 16 +------ .../test_aws_direct_connect_connection.py | 18 ++----- ...s_direct_connect_link_aggregation_group.py | 18 ++----- .../units/modules/cloud/amazon/test_aws_s3.py | 4 ++ .../cloud/amazon/test_cloudformation.py | 18 ++----- .../cloud/amazon/test_data_pipeline.py | 18 ++----- .../modules/cloud/amazon/test_ec2_group.py | 4 ++ .../cloud/amazon/test_iam_password_policy.py | 4 ++ .../cloud/amazon/test_kinesis_stream.py | 4 ++ .../units/modules/cloud/amazon/test_lambda.py | 15 +----- .../cloud/amazon/test_lambda_policy.py | 15 +----- .../test_redshift_cross_region_snapshots.py | 4 ++ .../modules/cloud/amazon/test_route53_zone.py | 4 ++ .../amazon/test_s3_bucket_notification.py | 4 ++ 26 files changed, 90 insertions(+), 166 deletions(-) diff --git a/test/integration/targets/inventory_aws_conformance/inventory_diff.py b/test/integration/targets/inventory_aws_conformance/inventory_diff.py index f50df11b867..3aaeff50b43 100755 --- a/test/integration/targets/inventory_aws_conformance/inventory_diff.py +++ b/test/integration/targets/inventory_aws_conformance/inventory_diff.py @@ -1,5 +1,8 @@ #!/usr/bin/env python +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import json import sys diff --git a/test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py b/test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py index 794d39542ef..ede07eeae5f 100644 --- a/test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py +++ b/test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py @@ -1,2 +1,5 @@ +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import boto.exceptions as exceptions # pylint: disable=useless-import-alias import boto.session as session # pylint: disable=useless-import-alias diff --git a/test/integration/targets/inventory_aws_conformance/lib/boto/ec2/__init__.py b/test/integration/targets/inventory_aws_conformance/lib/boto/ec2/__init__.py index a95dfe53186..e590be63952 100644 --- a/test/integration/targets/inventory_aws_conformance/lib/boto/ec2/__init__.py +++ b/test/integration/targets/inventory_aws_conformance/lib/boto/ec2/__init__.py @@ -1,5 +1,8 @@ # boto2 +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + from boto.mocks.instances import BotoInstance, Reservation diff --git a/test/integration/targets/inventory_aws_conformance/lib/boto/elasticache/__init__.py b/test/integration/targets/inventory_aws_conformance/lib/boto/elasticache/__init__.py index e8060797bce..4da41601a4b 100644 --- a/test/integration/targets/inventory_aws_conformance/lib/boto/elasticache/__init__.py +++ b/test/integration/targets/inventory_aws_conformance/lib/boto/elasticache/__init__.py @@ -1,3 +1,7 @@ +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + + class Connection(object): def __init__(self): pass diff --git a/test/integration/targets/inventory_aws_conformance/lib/boto/exception.py b/test/integration/targets/inventory_aws_conformance/lib/boto/exception.py index 4617c2896f9..0179d5d75fe 100644 --- a/test/integration/targets/inventory_aws_conformance/lib/boto/exception.py +++ b/test/integration/targets/inventory_aws_conformance/lib/boto/exception.py @@ -1,3 +1,6 @@ +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + class BotoServerError(Exception): pass diff --git a/test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py b/test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py index 4617c2896f9..0179d5d75fe 100644 --- a/test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py +++ b/test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py @@ -1,3 +1,6 @@ +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + class BotoServerError(Exception): pass diff --git a/test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py b/test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py index fd8e33f1260..9511a1dbaa4 100644 --- a/test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py +++ b/test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py @@ -1,3 +1,6 @@ +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + from ansible.module_utils.common._collections_compat import MutableMapping import datetime diff --git a/test/integration/targets/inventory_aws_conformance/lib/boto/session.py b/test/integration/targets/inventory_aws_conformance/lib/boto/session.py index 4624c306169..8e3d79f6609 100644 --- a/test/integration/targets/inventory_aws_conformance/lib/boto/session.py +++ b/test/integration/targets/inventory_aws_conformance/lib/boto/session.py @@ -1,6 +1,9 @@ #!/usr/bin/env python # boto3 +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + from boto.mocks.instances import Boto3Instance diff --git a/test/legacy/cleanup_ec2.py b/test/legacy/cleanup_ec2.py index 734fd15f001..65a8cc22641 100644 --- a/test/legacy/cleanup_ec2.py +++ b/test/legacy/cleanup_ec2.py @@ -4,6 +4,9 @@ Find and delete AWS resources matching the provided --match string. Unless Please use caution, you can easily delete you're *ENTIRE* EC2 infrastructure. ''' +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import boto import boto.ec2.elb import optparse diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index b876c961d87..7dd1e6e0afd 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -5803,22 +5803,6 @@ test/integration/targets/ignore_unreachable/fake_connectors/bad_exec.py future-i test/integration/targets/ignore_unreachable/fake_connectors/bad_exec.py metaclass-boilerplate test/integration/targets/ignore_unreachable/fake_connectors/bad_put_file.py future-import-boilerplate test/integration/targets/ignore_unreachable/fake_connectors/bad_put_file.py metaclass-boilerplate -test/integration/targets/inventory_aws_conformance/inventory_diff.py future-import-boilerplate -test/integration/targets/inventory_aws_conformance/inventory_diff.py metaclass-boilerplate -test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py future-import-boilerplate -test/integration/targets/inventory_aws_conformance/lib/boto/__init__.py metaclass-boilerplate -test/integration/targets/inventory_aws_conformance/lib/boto/ec2/__init__.py future-import-boilerplate -test/integration/targets/inventory_aws_conformance/lib/boto/ec2/__init__.py metaclass-boilerplate -test/integration/targets/inventory_aws_conformance/lib/boto/elasticache/__init__.py future-import-boilerplate -test/integration/targets/inventory_aws_conformance/lib/boto/elasticache/__init__.py metaclass-boilerplate -test/integration/targets/inventory_aws_conformance/lib/boto/exception.py future-import-boilerplate -test/integration/targets/inventory_aws_conformance/lib/boto/exception.py metaclass-boilerplate -test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py future-import-boilerplate -test/integration/targets/inventory_aws_conformance/lib/boto/exceptions.py metaclass-boilerplate -test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py future-import-boilerplate -test/integration/targets/inventory_aws_conformance/lib/boto/mocks/instances.py metaclass-boilerplate -test/integration/targets/inventory_aws_conformance/lib/boto/session.py future-import-boilerplate -test/integration/targets/inventory_aws_conformance/lib/boto/session.py metaclass-boilerplate test/integration/targets/inventory_kubevirt_conformance/inventory_diff.py future-import-boilerplate test/integration/targets/inventory_kubevirt_conformance/inventory_diff.py metaclass-boilerplate test/integration/targets/inventory_kubevirt_conformance/server.py future-import-boilerplate @@ -5923,8 +5907,6 @@ test/integration/targets/win_script/files/test_script_with_splatting.ps1 pslint: test/integration/targets/win_stat/library/test_symlink_file.ps1 pslint:PSCustomUseLiteralPath test/integration/targets/win_template/files/foo.dos.txt line-endings test/integration/targets/win_user_right/library/test_get_right.ps1 pslint:PSCustomUseLiteralPath -test/legacy/cleanup_ec2.py future-import-boilerplate -test/legacy/cleanup_ec2.py metaclass-boilerplate test/legacy/cleanup_gce.py future-import-boilerplate test/legacy/cleanup_gce.py metaclass-boilerplate test/legacy/cleanup_gce.py pylint:blacklisted-name @@ -5968,8 +5950,6 @@ test/units/module_utils/common/test_dict_transformations.py future-import-boiler test/units/module_utils/common/test_dict_transformations.py metaclass-boilerplate test/units/module_utils/conftest.py future-import-boilerplate test/units/module_utils/conftest.py metaclass-boilerplate -test/units/module_utils/ec2/test_aws.py future-import-boilerplate -test/units/module_utils/ec2/test_aws.py metaclass-boilerplate test/units/module_utils/facts/base.py future-import-boilerplate test/units/module_utils/facts/hardware/test_sunos_get_uptime_facts.py future-import-boilerplate test/units/module_utils/facts/hardware/test_sunos_get_uptime_facts.py metaclass-boilerplate @@ -6022,8 +6002,6 @@ test/units/module_utils/test_database.py future-import-boilerplate test/units/module_utils/test_database.py metaclass-boilerplate test/units/module_utils/test_distro.py future-import-boilerplate test/units/module_utils/test_distro.py metaclass-boilerplate -test/units/module_utils/test_ec2.py future-import-boilerplate -test/units/module_utils/test_ec2.py metaclass-boilerplate test/units/module_utils/test_hetzner.py future-import-boilerplate test/units/module_utils/test_hetzner.py metaclass-boilerplate test/units/module_utils/test_kubevirt.py future-import-boilerplate @@ -6038,37 +6016,12 @@ test/units/module_utils/xenserver/FakeAnsibleModule.py future-import-boilerplate test/units/module_utils/xenserver/FakeAnsibleModule.py metaclass-boilerplate test/units/module_utils/xenserver/FakeXenAPI.py future-import-boilerplate test/units/module_utils/xenserver/FakeXenAPI.py metaclass-boilerplate -test/units/modules/cloud/amazon/test_aws_api_gateway.py metaclass-boilerplate -test/units/modules/cloud/amazon/test_aws_direct_connect_connection.py future-import-boilerplate -test/units/modules/cloud/amazon/test_aws_direct_connect_connection.py metaclass-boilerplate -test/units/modules/cloud/amazon/test_aws_direct_connect_link_aggregation_group.py future-import-boilerplate -test/units/modules/cloud/amazon/test_aws_direct_connect_link_aggregation_group.py metaclass-boilerplate -test/units/modules/cloud/amazon/test_aws_s3.py future-import-boilerplate -test/units/modules/cloud/amazon/test_aws_s3.py metaclass-boilerplate -test/units/modules/cloud/amazon/test_cloudformation.py future-import-boilerplate -test/units/modules/cloud/amazon/test_cloudformation.py metaclass-boilerplate -test/units/modules/cloud/amazon/test_data_pipeline.py future-import-boilerplate -test/units/modules/cloud/amazon/test_data_pipeline.py metaclass-boilerplate -test/units/modules/cloud/amazon/test_ec2_group.py future-import-boilerplate -test/units/modules/cloud/amazon/test_ec2_group.py metaclass-boilerplate test/units/modules/cloud/amazon/test_ec2_vpc_nat_gateway.py future-import-boilerplate test/units/modules/cloud/amazon/test_ec2_vpc_nat_gateway.py metaclass-boilerplate test/units/modules/cloud/amazon/test_ec2_vpc_nat_gateway.py pylint:blacklisted-name test/units/modules/cloud/amazon/test_ec2_vpc_vpn.py future-import-boilerplate test/units/modules/cloud/amazon/test_ec2_vpc_vpn.py metaclass-boilerplate test/units/modules/cloud/amazon/test_ec2_vpc_vpn.py pylint:blacklisted-name -test/units/modules/cloud/amazon/test_iam_password_policy.py future-import-boilerplate -test/units/modules/cloud/amazon/test_iam_password_policy.py metaclass-boilerplate -test/units/modules/cloud/amazon/test_kinesis_stream.py future-import-boilerplate -test/units/modules/cloud/amazon/test_kinesis_stream.py metaclass-boilerplate -test/units/modules/cloud/amazon/test_lambda.py metaclass-boilerplate -test/units/modules/cloud/amazon/test_lambda_policy.py metaclass-boilerplate -test/units/modules/cloud/amazon/test_redshift_cross_region_snapshots.py future-import-boilerplate -test/units/modules/cloud/amazon/test_redshift_cross_region_snapshots.py metaclass-boilerplate -test/units/modules/cloud/amazon/test_route53_zone.py future-import-boilerplate -test/units/modules/cloud/amazon/test_route53_zone.py metaclass-boilerplate -test/units/modules/cloud/amazon/test_s3_bucket_notification.py future-import-boilerplate -test/units/modules/cloud/amazon/test_s3_bucket_notification.py metaclass-boilerplate test/units/modules/cloud/google/test_gce_tag.py future-import-boilerplate test/units/modules/cloud/google/test_gce_tag.py metaclass-boilerplate test/units/modules/cloud/google/test_gcp_forwarding_rule.py future-import-boilerplate diff --git a/test/units/module_utils/ec2/test_aws.py b/test/units/module_utils/ec2/test_aws.py index 6e566eee85e..9ef6e9e04e1 100644 --- a/test/units/module_utils/ec2/test_aws.py +++ b/test/units/module_utils/ec2/test_aws.py @@ -2,19 +2,10 @@ # (c) 2015, Allen Sanabria # # This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type try: import boto3 diff --git a/test/units/module_utils/test_ec2.py b/test/units/module_utils/test_ec2.py index eb6e956288c..dc748276e2e 100644 --- a/test/units/module_utils/test_ec2.py +++ b/test/units/module_utils/test_ec2.py @@ -1,21 +1,11 @@ # (c) 2017 Red Hat Inc. # # This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type -# (c) 2017 Red Hat Inc. import unittest from ansible.module_utils.ec2 import map_complex_type, compare_policies diff --git a/test/units/modules/cloud/amazon/test_aws_api_gateway.py b/test/units/modules/cloud/amazon/test_aws_api_gateway.py index 52bd55f4c21..30b0120a11c 100644 --- a/test/units/modules/cloud/amazon/test_aws_api_gateway.py +++ b/test/units/modules/cloud/amazon/test_aws_api_gateway.py @@ -2,23 +2,11 @@ # (c) 2016 Michael De La Rue # # This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish - from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import sys diff --git a/test/units/modules/cloud/amazon/test_aws_direct_connect_connection.py b/test/units/modules/cloud/amazon/test_aws_direct_connect_connection.py index 3ca3c061c10..d232b510956 100644 --- a/test/units/modules/cloud/amazon/test_aws_direct_connect_connection.py +++ b/test/units/modules/cloud/amazon/test_aws_direct_connect_connection.py @@ -1,19 +1,11 @@ # (c) 2017 Red Hat Inc. # # This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type from units.utils.amazon_placebo_fixtures import placeboify, maybe_sleep from ansible.modules.cloud.amazon import aws_direct_connect_connection diff --git a/test/units/modules/cloud/amazon/test_aws_direct_connect_link_aggregation_group.py b/test/units/modules/cloud/amazon/test_aws_direct_connect_link_aggregation_group.py index 0506741b8dc..1f733aeb4c9 100644 --- a/test/units/modules/cloud/amazon/test_aws_direct_connect_link_aggregation_group.py +++ b/test/units/modules/cloud/amazon/test_aws_direct_connect_link_aggregation_group.py @@ -1,19 +1,11 @@ # (c) 2017 Red Hat Inc. # # This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import pytest import os diff --git a/test/units/modules/cloud/amazon/test_aws_s3.py b/test/units/modules/cloud/amazon/test_aws_s3.py index 9b17502822c..a752c67fcba 100644 --- a/test/units/modules/cloud/amazon/test_aws_s3.py +++ b/test/units/modules/cloud/amazon/test_aws_s3.py @@ -1,3 +1,7 @@ +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import pytest import unittest diff --git a/test/units/modules/cloud/amazon/test_cloudformation.py b/test/units/modules/cloud/amazon/test_cloudformation.py index 99fa5d87723..dd6caa2da03 100644 --- a/test/units/modules/cloud/amazon/test_cloudformation.py +++ b/test/units/modules/cloud/amazon/test_cloudformation.py @@ -1,19 +1,11 @@ # (c) 2017 Red Hat Inc. # # This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import pytest diff --git a/test/units/modules/cloud/amazon/test_data_pipeline.py b/test/units/modules/cloud/amazon/test_data_pipeline.py index 499a9b0561f..7d821b39938 100644 --- a/test/units/modules/cloud/amazon/test_data_pipeline.py +++ b/test/units/modules/cloud/amazon/test_data_pipeline.py @@ -1,19 +1,11 @@ # (c) 2017 Red Hat Inc. # # This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import os import json diff --git a/test/units/modules/cloud/amazon/test_ec2_group.py b/test/units/modules/cloud/amazon/test_ec2_group.py index 33c9d69e412..14f597f69d8 100644 --- a/test/units/modules/cloud/amazon/test_ec2_group.py +++ b/test/units/modules/cloud/amazon/test_ec2_group.py @@ -1,3 +1,7 @@ +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + from ansible.modules.cloud.amazon import ec2_group as group_module diff --git a/test/units/modules/cloud/amazon/test_iam_password_policy.py b/test/units/modules/cloud/amazon/test_iam_password_policy.py index d2e887b3d65..85b828a1302 100644 --- a/test/units/modules/cloud/amazon/test_iam_password_policy.py +++ b/test/units/modules/cloud/amazon/test_iam_password_policy.py @@ -1,3 +1,7 @@ +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import pytest from units.modules.utils import set_module_args diff --git a/test/units/modules/cloud/amazon/test_kinesis_stream.py b/test/units/modules/cloud/amazon/test_kinesis_stream.py index 9aa8f01bd19..e549ae9d11b 100644 --- a/test/units/modules/cloud/amazon/test_kinesis_stream.py +++ b/test/units/modules/cloud/amazon/test_kinesis_stream.py @@ -1,3 +1,7 @@ +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import pytest import unittest diff --git a/test/units/modules/cloud/amazon/test_lambda.py b/test/units/modules/cloud/amazon/test_lambda.py index 844b442ade9..14ea2b454ce 100644 --- a/test/units/modules/cloud/amazon/test_lambda.py +++ b/test/units/modules/cloud/amazon/test_lambda.py @@ -2,22 +2,11 @@ # (c) 2017 Michael De La Rue # # This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import copy import pytest diff --git a/test/units/modules/cloud/amazon/test_lambda_policy.py b/test/units/modules/cloud/amazon/test_lambda_policy.py index bc836d83f37..5c323704693 100644 --- a/test/units/modules/cloud/amazon/test_lambda_policy.py +++ b/test/units/modules/cloud/amazon/test_lambda_policy.py @@ -2,22 +2,11 @@ # (c) 2017 Michael De La Rue # # This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) +__metaclass__ = type import copy diff --git a/test/units/modules/cloud/amazon/test_redshift_cross_region_snapshots.py b/test/units/modules/cloud/amazon/test_redshift_cross_region_snapshots.py index 4a00a206919..1891b5c8907 100644 --- a/test/units/modules/cloud/amazon/test_redshift_cross_region_snapshots.py +++ b/test/units/modules/cloud/amazon/test_redshift_cross_region_snapshots.py @@ -1,3 +1,7 @@ +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + from ansible.modules.cloud.amazon import redshift_cross_region_snapshots as rcrs mock_status_enabled = { diff --git a/test/units/modules/cloud/amazon/test_route53_zone.py b/test/units/modules/cloud/amazon/test_route53_zone.py index e60e745e1a0..283584a4dd7 100644 --- a/test/units/modules/cloud/amazon/test_route53_zone.py +++ b/test/units/modules/cloud/amazon/test_route53_zone.py @@ -1,3 +1,7 @@ +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import functools from ansible.modules.cloud.amazon import route53_zone diff --git a/test/units/modules/cloud/amazon/test_s3_bucket_notification.py b/test/units/modules/cloud/amazon/test_s3_bucket_notification.py index 934a1a68e58..cf342064c02 100644 --- a/test/units/modules/cloud/amazon/test_s3_bucket_notification.py +++ b/test/units/modules/cloud/amazon/test_s3_bucket_notification.py @@ -1,3 +1,7 @@ +# Make coding more python3-ish +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + import pytest from units.compat.mock import MagicMock, patch