getmoto / moto

A library that allows you to easily mock out tests based on AWS infrastructure.
http://docs.getmoto.org/en/latest/
Apache License 2.0
7.58k stars 2.02k forks source link

3.1.10: pytest runs forever many units and in few are failing #5349

Closed kloczek closed 2 years ago

kloczek commented 2 years ago

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

Here is pytest output:

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-moto-3.1.10-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-moto-3.1.10-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -vv --deselect tests/test_batch/test_batch_jobs.py::test_cancel_running_job --deselect tests/test_batch/test_batch_jobs.py::test_container_overrides --deselect tests/test_batch/test_batch_jobs.py::test_dependencies --deselect tests/test_batch/test_batch_jobs.py::test_list_jobs --deselect tests/test_batch/test_batch_jobs.py::test_submit_job --deselect tests/test_batch/test_batch_jobs.py::test_terminate_job --deselect tests/test_cloudformation/test_import_value.py::TestSimpleInstance::test_simple_instance --deselect tests/test_cloudformation/test_import_value.py::TestSimpleInstance::test_simple_instance_missing_export --deselect tests/test_cloudformation/test_server.py::test_cloudformation_server_get --deselect 'tests/test_core/test_url_base_regex.py::TestMockBucketStartingWithServiceName::test_bucketname_starting_with_service_name[cloudformation-]' --deselect 'tests/test_core/test_url_base_regex.py::TestMockBucketStartingWithServiceName::test_bucketname_starting_with_service_name[iotdata-]' --deselect 'tests/test_core/test_url_base_regex.py::TestMockBucketStartingWithServiceName::test_bucketname_starting_with_service_name[lambda-]' --deselect 'tests/test_core/test_url_base_regex.py::TestMockBucketStartingWithServiceName::test_bucketname_starting_with_service_name[resourcegroupstaggingapi-]' --deselect 'tests/test_core/test_url_base_regex.py::TestMockBucketStartingWithServiceName::test_bucketname_starting_with_service_name[xray-]' --deselect tests/test_dynamodbstreams/test_dynamodbstreams.py::TestCore::test_get_records_seq --deselect tests/test_dynamodbstreams/test_dynamodbstreams.py::TestEdges::test_stream_with_range_key --deselect tests/test_dynamodb/test_dynamodb.py::test_put_item_with_streams --deselect tests/test_ec2/test_vpc_endpoint_services_integration.py::test_describe_vpc_default_endpoint_services --deselect tests/test_ec2/test_vpc_endpoint_services_integration.py::test_describe_vpc_endpoint_services_bad_args --deselect tests/test_resourcegroupstaggingapi/test_server.py::test_resourcegroupstaggingapi_list --ignore tests/test_apigateway/test_apigateway_cloudformation.py --ignore tests/test_autoscaling/test_autoscaling_cloudformation.py --ignore tests/test_awslambda/test_awslambda_cloudformation.py --ignore tests/test_awslambda/test_lambda_alias.py --ignore tests/test_awslambda/test_lambda_concurrency.py --ignore tests/test_awslambda/test_lambda_eventsourcemapping.py --ignore tests/test_awslambda/test_lambda_invoke.py --ignore tests/test_awslambda/test_lambda_layers.py --ignore tests/test_awslambda/test_lambda_policy.py --ignore tests/test_awslambda/test_lambda.py --ignore tests/test_awslambda/test_lambda_tags.py --ignore tests/test_awslambda/test_policy.py --ignore tests/test_batch_simple/test_batch_cloudformation.py --ignore tests/test_batch/test_batch_cloudformation.py --ignore tests/test_cloudformation/test_cloudformation_custom_resources.py --ignore tests/test_cloudformation/test_cloudformation_depends_on.py --ignore tests/test_cloudformation/test_cloudformation_stack_crud_boto3.py --ignore tests/test_cloudformation/test_cloudformation_stack_integration.py --ignore tests/test_cloudformation/test_cloudformation_stack_policies.py --ignore tests/test_cloudformation/test_stack_parsing.py --ignore tests/test_cloudformation/test_validate.py --ignore tests/test_config/test_config_rules_integration.py --ignore tests/test_core/test_mock_all.py --ignore tests/test_datapipeline/test_datapipeline_cloudformation.py --ignore tests/test_dynamodb/test_dynamodb_cloudformation.py --ignore tests/test_ec2/test_ec2_cloudformation.py --ignore tests/test_ec2/test_flow_logs_cloudformation.py --ignore tests/test_ec2/test_security_groups_cloudformation.py --ignore tests/test_ec2/test_transit_gateway_cloudformation.py --ignore tests/test_ecr/test_ecr_cloudformation.py --ignore tests/test_ecs/test_ecs_cloudformation.py --ignore tests/test_elb/test_elb_cloudformation.py --ignore tests/test_elbv2/test_elbv2_cloudformation.py --ignore tests/test_events/test_events_cloudformation.py --ignore tests/test_iam/test_iam_cloudformation.py --ignore tests/test_iotdata/test_iotdata.py --ignore tests/test_iotdata/test_server.py --ignore tests/test_kinesis/test_kinesis_cloudformation.py --ignore tests/test_logs/test_integration.py --ignore tests/test_rds/test_rds_cloudformation.py --ignore tests/test_redshift/test_redshift_cloudformation.py --ignore tests/test_resourcegroupstaggingapi/test_resourcegroupstaggingapi.py --ignore tests/test_route53/test_route53_cloudformation.py --ignore tests/test_s3/test_s3_cloudformation.py --ignore tests/test_s3/test_s3_lambda_integration.py --ignore tests/test_sagemaker/test_sagemaker_cloudformation.py --ignore tests/test_secretsmanager/test_server.py --ignore tests/test_sns/test_sns_cloudformation.py --ignore tests/test_sqs/test_integration.py --ignore tests/test_sqs/test_sqs_cloudformation.py --ignore tests/test_sqs/test_sqs_integration.py --ignore tests/test_ssm/test_ssm_cloudformation.py --ignore tests/test_stepfunctions/test_stepfunctions_cloudformation.py --ignore tests/test_xray/test_xray_boto3.py --ignore tests/test_xray/test_xray_client.py --deselect tests/test_ec2/test_customer_gateways.py::test_create_customer_gateways_boto3 =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0 -- /usr/bin/python3 cachedir: .pytest_cache rootdir: /home/tkloczko/rpmbuild/BUILD/moto-3.1.10, configfile: setup.cfg collected 5977 items / 24 deselected / 5953 selected tests/test_acm/test_acm.py::test_import_certificate PASSED [ 0%] tests/test_acm/test_acm.py::test_import_certificate_with_tags PASSED [ 0%] tests/test_acm/test_acm.py::test_import_bad_certificate PASSED [ 0%] tests/test_acm/test_acm.py::test_list_certificates PASSED [ 0%] tests/test_acm/test_acm.py::test_list_certificates_by_status PASSED [ 0%] tests/test_acm/test_acm.py::test_get_invalid_certificate PASSED [ 0%] tests/test_acm/test_acm.py::test_delete_certificate PASSED [ 0%] tests/test_acm/test_acm.py::test_describe_certificate PASSED [ 0%] tests/test_acm/test_acm.py::test_describe_certificate_with_bad_arn PASSED [ 0%] tests/test_acm/test_acm.py::test_export_certificate PASSED [ 0%] tests/test_acm/test_acm.py::test_export_certificate_with_bad_arn PASSED [ 0%] tests/test_acm/test_acm.py::test_add_tags_to_certificate PASSED [ 0%] tests/test_acm/test_acm.py::test_add_tags_to_invalid_certificate PASSED [ 0%] tests/test_acm/test_acm.py::test_list_tags_for_invalid_certificate PASSED [ 0%] tests/test_acm/test_acm.py::test_remove_tags_from_certificate PASSED [ 0%] tests/test_acm/test_acm.py::test_remove_tags_from_invalid_certificate PASSED [ 0%] tests/test_acm/test_acm.py::test_resend_validation_email PASSED [ 0%] tests/test_acm/test_acm.py::test_resend_validation_email_invalid PASSED [ 0%] tests/test_acm/test_acm.py::test_request_certificate PASSED [ 0%] tests/test_acm/test_acm.py::test_request_certificate_with_tags PASSED [ 0%] tests/test_acm/test_acm.py::test_operations_with_invalid_tags PASSED [ 0%] tests/test_acm/test_acm.py::test_add_too_many_tags PASSED [ 0%] tests/test_acm/test_acm.py::test_request_certificate_no_san PASSED [ 0%] tests/test_acm/test_acm.py::test_request_certificate_issued_status PASSED [ 0%] tests/test_acm/test_acm.py::test_request_certificate_issued_status_with_wait_in_envvar PASSED [ 0%] tests/test_acm/test_acm.py::test_request_certificate_with_mutiple_times PASSED [ 0%] tests/test_acm/test_acm.py::test_elb_acm_in_use_by PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_create_and_get_rest_api PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_update_rest_api PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_update_rest_api_invalid_api_id PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_update_rest_api_operation_add_remove PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_list_and_delete_apis PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_create_rest_api_with_tags PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_create_rest_api_with_policy PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_create_rest_api_invalid_apikeysource PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_create_rest_api_valid_apikeysources PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_create_rest_api_invalid_endpointconfiguration PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_create_rest_api_valid_endpointconfigurations PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_create_resource__validate_name PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_create_resource PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_child_resource PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_create_method PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_create_method_apikeyrequired PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_create_method_response PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_get_method_unknown_resource_id PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_delete_method PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_integrations PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_integration_response PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_update_authorizer_configuration PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_non_existent_authorizer PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_create_authorizer PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_delete_authorizer PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_put_integration_response_with_response_template PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_put_integration_validation PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_create_domain_names PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_get_domain_names PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_get_domain_name PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_create_model PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_get_api_models PASSED [ 0%] tests/test_apigateway/test_apigateway.py::test_get_model_by_name PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_get_model_with_invalid_name PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_api_key_value_min_length PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_get_api_key_include_value PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_get_api_keys_include_values PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_create_api_key PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_create_api_key_twice PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_api_keys PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_usage_plans PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_update_usage_plan PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_usage_plan_keys PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_create_usage_plan_key_non_existent_api_key PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_get_usage_plans_using_key_id PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_get_integration_response_unknown_response PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_get_api_key_unknown_apikey PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_get_domain_name_unknown_domainname PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_update_domain_name_unknown_domainname PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_delete_domain_name_unknown_domainname PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_create_base_path_mapping PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_create_base_path_mapping_with_unknown_api PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_create_base_path_mapping_with_invalid_base_path PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_create_base_path_mapping_with_unknown_stage PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_create_base_path_mapping_with_duplicate_base_path PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_get_base_path_mappings PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_get_base_path_mappings_with_unknown_domain PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_get_base_path_mapping PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_get_base_path_mapping_with_unknown_domain PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_get_base_path_mapping_with_unknown_base_path PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_delete_base_path_mapping PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_delete_base_path_mapping_with_unknown_domain PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_delete_base_path_mapping_with_unknown_base_path PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_update_path_mapping PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_update_path_mapping_with_unknown_domain PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_update_path_mapping_with_unknown_base_path PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_update_path_mapping_to_same_base_path PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_update_path_mapping_with_unknown_api PASSED [ 1%] tests/test_apigateway/test_apigateway.py::test_update_path_mapping_with_unknown_stage PASSED [ 1%] tests/test_apigateway/test_apigateway_deployments.py::test_create_deployment_requires_REST_methods PASSED [ 1%] tests/test_apigateway/test_apigateway_deployments.py::test_create_deployment_requires_REST_method_integrations PASSED [ 1%] tests/test_apigateway/test_apigateway_deployments.py::test_create_simple_deployment_with_get_method PASSED [ 1%] tests/test_apigateway/test_apigateway_deployments.py::test_create_simple_deployment_with_post_method PASSED [ 1%] tests/test_apigateway/test_apigateway_deployments.py::test_create_deployment_minimal PASSED [ 1%] tests/test_apigateway/test_apigateway_deployments.py::test_create_deployment_with_empty_stage PASSED [ 1%] tests/test_apigateway/test_apigateway_deployments.py::test_get_deployments PASSED [ 1%] tests/test_apigateway/test_apigateway_deployments.py::test_create_multiple_deployments PASSED [ 1%] tests/test_apigateway/test_apigateway_deployments.py::test_delete_deployment__requires_stage_to_be_deleted PASSED [ 1%] tests/test_apigateway/test_apigateway_deployments.py::test_delete_unknown_deployment PASSED [ 1%] tests/test_apigateway/test_apigateway_gatewayresponses.py::test_put_gateway_response_minimal PASSED [ 1%] tests/test_apigateway/test_apigateway_gatewayresponses.py::test_put_gateway_response PASSED [ 1%] tests/test_apigateway/test_apigateway_gatewayresponses.py::test_get_gateway_response_minimal PASSED [ 1%] tests/test_apigateway/test_apigateway_gatewayresponses.py::test_get_gateway_response PASSED [ 1%] tests/test_apigateway/test_apigateway_gatewayresponses.py::test_get_gateway_response_unknown PASSED [ 1%] tests/test_apigateway/test_apigateway_gatewayresponses.py::test_get_gateway_responses_empty PASSED [ 1%] tests/test_apigateway/test_apigateway_gatewayresponses.py::test_get_gateway_responses PASSED [ 1%] tests/test_apigateway/test_apigateway_gatewayresponses.py::test_delete_gateway_response PASSED [ 1%] tests/test_apigateway/test_apigateway_importrestapi.py::test_import_rest_api__api_is_created PASSED [ 1%] tests/test_apigateway/test_apigateway_importrestapi.py::test_import_rest_api__invalid_api_creates_nothing PASSED [ 1%] tests/test_apigateway/test_apigateway_importrestapi.py::test_import_rest_api__methods_are_created PASSED [ 1%] tests/test_apigateway/test_apigateway_integration.py::test_http_integration PASSED [ 1%] tests/test_apigateway/test_apigateway_integration.py::test_aws_integration_dynamodb PASSED [ 1%] tests/test_apigateway/test_apigateway_integration.py::test_aws_integration_dynamodb_multiple_stages PASSED [ 2%] tests/test_apigateway/test_apigateway_integration.py::test_aws_integration_dynamodb_multiple_resources PASSED [ 2%] tests/test_apigateway/test_apigateway_putrestapi.py::test_put_rest_api__api_details_are_persisted PASSED [ 2%] tests/test_apigateway/test_apigateway_putrestapi.py::test_put_rest_api__methods_are_created PASSED [ 2%] tests/test_apigateway/test_apigateway_putrestapi.py::test_put_rest_api__existing_methods_are_overwritten PASSED [ 2%] tests/test_apigateway/test_apigateway_putrestapi.py::test_put_rest_api__existing_methods_still_exist PASSED [ 2%] tests/test_apigateway/test_apigateway_putrestapi.py::test_put_rest_api__fail_on_invalid_spec PASSED [ 2%] tests/test_apigateway/test_apigateway_putrestapi.py::test_put_rest_api__fail_on_invalid_version PASSED [ 2%] tests/test_apigateway/test_apigateway_putrestapi.py::test_put_rest_api__fail_on_invalid_mode PASSED [ 2%] tests/test_apigateway/test_apigateway_putrestapi.py::test_put_rest_api__as_yaml PASSED [ 2%] tests/test_apigateway/test_apigateway_stage.py::test_create_stage_minimal PASSED [ 2%] tests/test_apigateway/test_apigateway_stage.py::test_create_stage_with_env_vars PASSED [ 2%] tests/test_apigateway/test_apigateway_stage.py::test_create_stage_with_vars_and_cache PASSED [ 2%] tests/test_apigateway/test_apigateway_stage.py::test_create_stage_with_cache_settings PASSED [ 2%] tests/test_apigateway/test_apigateway_stage.py::test_recreate_stage_from_deployment PASSED [ 2%] tests/test_apigateway/test_apigateway_stage.py::test_create_stage_twice PASSED [ 2%] tests/test_apigateway/test_apigateway_stage.py::test_delete_stage PASSED [ 2%] tests/test_apigateway/test_apigateway_stage.py::test_delete_stage_created_by_deployment PASSED [ 2%] tests/test_apigateway/test_apigateway_stage.py::test_delete_stage_unknown_stage PASSED [ 2%] tests/test_apigateway/test_apigateway_stage.py::test_update_stage_configuration PASSED [ 2%] tests/test_apigateway/test_apigateway_stage.py::test_update_stage_add_access_log_settings PASSED [ 2%] tests/test_apigateway/test_apigateway_stage.py::test_update_stage_tracing_disabled PASSED [ 2%] tests/test_apigateway/test_apigateway_stage.py::test_update_stage_remove_access_log_settings PASSED [ 2%] tests/test_apigateway/test_apigateway_stage.py::test_update_stage_configuration_unknown_operation PASSED [ 2%] tests/test_apigateway/test_apigateway_stage.py::test_non_existent_stage PASSED [ 2%] tests/test_apigateway/test_apigateway_validators.py::test_create_request_validator PASSED [ 2%] tests/test_apigateway/test_apigateway_validators.py::test_get_request_validators PASSED [ 2%] tests/test_apigateway/test_apigateway_validators.py::test_get_request_validator PASSED [ 2%] tests/test_apigateway/test_apigateway_validators.py::test_delete_request_validator PASSED [ 2%] tests/test_apigateway/test_apigateway_validators.py::test_update_request_validator PASSED [ 2%] tests/test_apigateway/test_apigateway_vpclink.py::test_get_vpc_links_empty PASSED [ 2%] tests/test_apigateway/test_apigateway_vpclink.py::test_create_vpc_link PASSED [ 2%] tests/test_apigateway/test_apigateway_vpclink.py::test_get_vpc_link PASSED [ 2%] tests/test_apigateway/test_apigateway_vpclink.py::test_get_vpc_link_unknown PASSED [ 2%] tests/test_apigateway/test_apigateway_vpclink.py::test_get_vpc_links PASSED [ 2%] tests/test_apigateway/test_apigateway_vpclink.py::test_delete_vpc_link PASSED [ 2%] tests/test_apigateway/test_server.py::test_list_apis ```

BTW I've added all units which requires docker and aws_xray_sdk do --deselect list because I have no packaged yest those modules. Is it really necessary to use docker? virtualenv cannot be used instead?

kloczek commented 2 years ago

After add tests/test_apigateway/test_server.py::test_list_apis to --deselect list I;ve restarted pytest. However after I found 5 such units I wrorte oneliner to find all units which are ghanging. Here is my current --deselect list of such units

        --deselect tests/test_apigateway/test_server.py::test_create_usage_plans_key_non_existent_api_key \
        --deselect tests/test_apigateway/test_server.py::test_list_apis \
        --deselect tests/test_apigateway/test_server.py::test_put_integration_response_without_body \
        --deselect tests/test_apigateway/test_server.py::test_usage_plans_apis \
        --deselect tests/test_apigateway/test_server.py::test_usage_plans_keys \
        --deselect tests/test_apigatewayv2/test_server.py::test_apigatewayv2_list_apis \
        --deselect tests/test_appsync/test_server.py::test_appsync_list_tags_for_resource \
        --deselect tests/test_batch/test_server.py::test_batch_list \
        --deselect tests/test_cloudfront/test_server.py::test_cloudfront_list \
        --deselect tests/test_cognitoidp/test_server.py::test_admin_create_user_without_authentication \
        --deselect tests/test_cognitoidp/test_server.py::test_sign_up_user_without_authentication \
        --deselect tests/test_core/test_server.py::test_domain_dispatched_with_service \
        --deselect tests/test_eks/test_server.py::test_eks_create_multiple_clusters_with_same_name \
        --deselect tests/test_eks/test_server.py::test_eks_create_multiple_nodegroups_with_same_name \
        --deselect tests/test_eks/test_server.py::test_eks_create_nodegroup_on_existing_cluster \
        --deselect tests/test_eks/test_server.py::test_eks_create_nodegroup_without_cluster \
        --deselect tests/test_eks/test_server.py::test_eks_create_single_cluster \
        --deselect tests/test_eks/test_server.py::test_eks_delete_cluster \
        --deselect tests/test_eks/test_server.py::test_eks_delete_nodegroup \
        --deselect tests/test_eks/test_server.py::test_eks_delete_nonexisting_cluster \
        --deselect tests/test_eks/test_server.py::test_eks_delete_nonexisting_nodegroup \
        --deselect tests/test_eks/test_server.py::test_eks_describe_existing_cluster \
        --deselect tests/test_eks/test_server.py::test_eks_describe_existing_nodegroup \
        --deselect tests/test_eks/test_server.py::test_eks_describe_nodegroup_nonexisting_cluster \
        --deselect tests/test_eks/test_server.py::test_eks_describe_nonexisting_cluster \
        --deselect tests/test_eks/test_server.py::test_eks_describe_nonexisting_nodegroup \
        --deselect tests/test_eks/test_server.py::test_eks_list_clusters \
        --deselect tests/test_eks/test_server.py::test_eks_list_nodegroups \
        --deselect tests/test_elastictranscoder/test_server.py::test_elastictranscoder_list \
        --deselect tests/test_emrcontainers/test_server.py::test_list_virtual_clusters \
        --deselect tests/test_es/test_server.py::test_es_list \
        --deselect tests/test_glacier/test_server.py::test_list_vaults \
        --deselect tests/test_mediaconnect/test_server.py::test_mediaconnect_list_flows \
        --deselect tests/test_medialive/test_server.py::test_medialive_list_channels \
        --deselect tests/test_medialive/test_server.py::test_medialive_list_inputs \
        --deselect tests/test_mediapackage/test_server.py::test_mediapackage_list_channels \
        --deselect tests/test_mediapackage/test_server.py::test_mediapackage_list_origin_endpoints \
        --deselect tests/test_mediastoredata/test_server.py::test_mediastore_lists_containers \
        --deselect tests/test_mediastore/test_server.py::test_mediastore_lists_containers \
        --deselect tests/test_mq/test_server.py::test_mq_list \
        --deselect tests/test_polly/test_server.py::test_polly_list \
        --deselect tests/test_route53/test_server.py::test_list_recordset \
        --deselect tests/test_s3bucket_path/test_server.py::test_s3_server_bucket_create \
        --deselect tests/test_s3bucket_path/test_server.py::test_s3_server_get \
        --deselect tests/test_s3bucket_path/test_server.py::test_s3_server_post_to_bucket \
        --deselect tests/test_s3bucket_path/test_server.py::test_s3_server_put_ipv4 \
        --deselect tests/test_s3bucket_path/test_server.py::test_s3_server_put_ipv6 \
        --deselect tests/test_s3/test_server.py::test_s3_server_bucket_create \
        --deselect tests/test_s3/test_server.py::test_s3_server_bucket_versioning \
        --deselect tests/test_s3/test_server.py::test_s3_server_get \
        --deselect tests/test_s3/test_server.py::test_s3_server_ignore_subdomain_for_bucketnames \
        --deselect tests/test_s3/test_server.py::test_s3_server_post_cors \
        --deselect tests/test_s3/test_server.py::test_s3_server_post_to_bucket \
        --deselect tests/test_s3/test_server.py::test_s3_server_post_unicode_bucket_key \
        --deselect tests/test_s3/test_server.py::test_s3_server_post_without_content_length \
        --deselect tests/test_utilities/test_threaded_server.py::test_threaded_moto_server__different_port \
        --deselect tests/test_utilities/test_threaded_server.py::TestThreadedMotoServer::test_load_data_from_inmemory_client \
        --deselect tests/test_utilities/test_threaded_server.py::TestThreadedMotoServer::test_server_can_handle_multiple_services \
        --deselect tests/test_utilities/test_threaded_server.py::TestThreadedMotoServer::test_server_is_reachable \
bblommers commented 2 years ago

Hi @kloczek, which version of werkzeug are pulling in? There is a known bug with version>=2.2.0, so you may have better luck installing an older version (2.1.x).

Re docker: we use Docker to run our Lambdas in, to ensure that the environment/context comes as close as possible to what AWS provides. I don't think it is be possible to achieve the same using virtualenv.

kloczek commented 2 years ago

After all those hanging units in --deselect list I was able to finish pytest and found that some units are failing. Looks like pytest shows as well some warnings

Here is pytest output

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-moto-3.1.10-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-moto-3.1.10-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra --deselect tests/test_batch/test_batch_jobs.py::test_cancel_running_job --deselect tests/test_batch/test_batch_jobs.py::test_container_overrides --deselect tests/test_batch/test_batch_jobs.py::test_dependencies --deselect tests/test_batch/test_batch_jobs.py::test_list_jobs --deselect tests/test_batch/test_batch_jobs.py::test_submit_job --deselect tests/test_batch/test_batch_jobs.py::test_terminate_job --deselect tests/test_cloudformation/test_import_value.py::TestSimpleInstance::test_simple_instance --deselect tests/test_cloudformation/test_import_value.py::TestSimpleInstance::test_simple_instance_missing_export --deselect tests/test_cloudformation/test_server.py::test_cloudformation_server_get --deselect 'tests/test_core/test_url_base_regex.py::TestMockBucketStartingWithServiceName::test_bucketname_starting_with_service_name[cloudformation-]' --deselect 'tests/test_core/test_url_base_regex.py::TestMockBucketStartingWithServiceName::test_bucketname_starting_with_service_name[iotdata-]' --deselect 'tests/test_core/test_url_base_regex.py::TestMockBucketStartingWithServiceName::test_bucketname_starting_with_service_name[lambda-]' --deselect 'tests/test_core/test_url_base_regex.py::TestMockBucketStartingWithServiceName::test_bucketname_starting_with_service_name[resourcegroupstaggingapi-]' --deselect 'tests/test_core/test_url_base_regex.py::TestMockBucketStartingWithServiceName::test_bucketname_starting_with_service_name[xray-]' --deselect tests/test_dynamodbstreams/test_dynamodbstreams.py::TestCore::test_get_records_seq --deselect tests/test_dynamodbstreams/test_dynamodbstreams.py::TestEdges::test_stream_with_range_key --deselect tests/test_dynamodb/test_dynamodb.py::test_put_item_with_streams --deselect tests/test_ec2/test_vpc_endpoint_services_integration.py::test_describe_vpc_default_endpoint_services --deselect tests/test_ec2/test_vpc_endpoint_services_integration.py::test_describe_vpc_endpoint_services_bad_args --deselect tests/test_resourcegroupstaggingapi/test_server.py::test_resourcegroupstaggingapi_list --ignore tests/test_apigateway/test_apigateway_cloudformation.py --ignore tests/test_autoscaling/test_autoscaling_cloudformation.py --ignore tests/test_awslambda/test_awslambda_cloudformation.py --ignore tests/test_awslambda/test_lambda_alias.py --ignore tests/test_awslambda/test_lambda_concurrency.py --ignore tests/test_awslambda/test_lambda_eventsourcemapping.py --ignore tests/test_awslambda/test_lambda_invoke.py --ignore tests/test_awslambda/test_lambda_layers.py --ignore tests/test_awslambda/test_lambda_policy.py --ignore tests/test_awslambda/test_lambda.py --ignore tests/test_awslambda/test_lambda_tags.py --ignore tests/test_awslambda/test_policy.py --ignore tests/test_batch_simple/test_batch_cloudformation.py --ignore tests/test_batch/test_batch_cloudformation.py --ignore tests/test_cloudformation/test_cloudformation_custom_resources.py --ignore tests/test_cloudformation/test_cloudformation_depends_on.py --ignore tests/test_cloudformation/test_cloudformation_stack_crud_boto3.py --ignore tests/test_cloudformation/test_cloudformation_stack_integration.py --ignore tests/test_cloudformation/test_cloudformation_stack_policies.py --ignore tests/test_cloudformation/test_stack_parsing.py --ignore tests/test_cloudformation/test_validate.py --ignore tests/test_config/test_config_rules_integration.py --ignore tests/test_core/test_mock_all.py --ignore tests/test_datapipeline/test_datapipeline_cloudformation.py --ignore tests/test_dynamodb/test_dynamodb_cloudformation.py --ignore tests/test_ec2/test_ec2_cloudformation.py --ignore tests/test_ec2/test_flow_logs_cloudformation.py --ignore tests/test_ec2/test_security_groups_cloudformation.py --ignore tests/test_ec2/test_transit_gateway_cloudformation.py --ignore tests/test_ecr/test_ecr_cloudformation.py --ignore tests/test_ecs/test_ecs_cloudformation.py --ignore tests/test_elb/test_elb_cloudformation.py --ignore tests/test_elbv2/test_elbv2_cloudformation.py --ignore tests/test_events/test_events_cloudformation.py --ignore tests/test_iam/test_iam_cloudformation.py --ignore tests/test_iotdata/test_iotdata.py --ignore tests/test_iotdata/test_server.py --ignore tests/test_kinesis/test_kinesis_cloudformation.py --ignore tests/test_logs/test_integration.py --ignore tests/test_rds/test_rds_cloudformation.py --ignore tests/test_redshift/test_redshift_cloudformation.py --ignore tests/test_resourcegroupstaggingapi/test_resourcegroupstaggingapi.py --ignore tests/test_route53/test_route53_cloudformation.py --ignore tests/test_s3/test_s3_cloudformation.py --ignore tests/test_s3/test_s3_lambda_integration.py --ignore tests/test_sagemaker/test_sagemaker_cloudformation.py --ignore tests/test_secretsmanager/test_server.py --ignore tests/test_sns/test_sns_cloudformation.py --ignore tests/test_sqs/test_integration.py --ignore tests/test_sqs/test_sqs_cloudformation.py --ignore tests/test_sqs/test_sqs_integration.py --ignore tests/test_ssm/test_ssm_cloudformation.py --ignore tests/test_stepfunctions/test_stepfunctions_cloudformation.py --ignore tests/test_xray/test_xray_boto3.py --ignore tests/test_xray/test_xray_client.py --deselect tests/test_apigateway/test_server.py::test_create_usage_plans_key_non_existent_api_key --deselect tests/test_apigateway/test_server.py::test_list_apis --deselect tests/test_apigateway/test_server.py::test_put_integration_response_without_body --deselect tests/test_apigateway/test_server.py::test_usage_plans_apis --deselect tests/test_apigateway/test_server.py::test_usage_plans_keys --deselect tests/test_apigatewayv2/test_server.py::test_apigatewayv2_list_apis --deselect tests/test_appsync/test_server.py::test_appsync_list_tags_for_resource --deselect tests/test_batch/test_server.py::test_batch_list --deselect tests/test_cloudfront/test_server.py::test_cloudfront_list --deselect tests/test_cognitoidp/test_server.py::test_admin_create_user_without_authentication --deselect tests/test_cognitoidp/test_server.py::test_sign_up_user_without_authentication --deselect tests/test_core/test_server.py::test_domain_dispatched_with_service --deselect tests/test_eks/test_server.py::test_eks_create_multiple_clusters_with_same_name --deselect tests/test_eks/test_server.py::test_eks_create_multiple_nodegroups_with_same_name --deselect tests/test_eks/test_server.py::test_eks_create_nodegroup_on_existing_cluster --deselect tests/test_eks/test_server.py::test_eks_create_nodegroup_without_cluster --deselect tests/test_eks/test_server.py::test_eks_create_single_cluster --deselect tests/test_eks/test_server.py::test_eks_delete_cluster --deselect tests/test_eks/test_server.py::test_eks_delete_nodegroup --deselect tests/test_eks/test_server.py::test_eks_delete_nonexisting_cluster --deselect tests/test_eks/test_server.py::test_eks_delete_nonexisting_nodegroup --deselect tests/test_eks/test_server.py::test_eks_describe_existing_cluster --deselect tests/test_eks/test_server.py::test_eks_describe_existing_nodegroup --deselect tests/test_eks/test_server.py::test_eks_describe_nodegroup_nonexisting_cluster --deselect tests/test_eks/test_server.py::test_eks_describe_nonexisting_cluster --deselect tests/test_eks/test_server.py::test_eks_describe_nonexisting_nodegroup --deselect tests/test_eks/test_server.py::test_eks_list_clusters --deselect tests/test_eks/test_server.py::test_eks_list_nodegroups --deselect tests/test_elastictranscoder/test_server.py::test_elastictranscoder_list --deselect tests/test_emrcontainers/test_server.py::test_list_virtual_clusters --deselect tests/test_es/test_server.py::test_es_list --deselect tests/test_glacier/test_server.py::test_list_vaults --deselect tests/test_mediaconnect/test_server.py::test_mediaconnect_list_flows --deselect tests/test_medialive/test_server.py::test_medialive_list_channels --deselect tests/test_medialive/test_server.py::test_medialive_list_inputs --deselect tests/test_mediapackage/test_server.py::test_mediapackage_list_channels --deselect tests/test_mediapackage/test_server.py::test_mediapackage_list_origin_endpoints --deselect tests/test_mediastoredata/test_server.py::test_mediastore_lists_containers --deselect tests/test_mediastore/test_server.py::test_mediastore_lists_containers --deselect tests/test_mq/test_server.py::test_mq_list --deselect tests/test_polly/test_server.py::test_polly_list --deselect tests/test_route53/test_server.py::test_list_recordset --deselect tests/test_s3bucket_path/test_server.py::test_s3_server_bucket_create --deselect tests/test_s3bucket_path/test_server.py::test_s3_server_get --deselect tests/test_s3bucket_path/test_server.py::test_s3_server_post_to_bucket --deselect tests/test_s3bucket_path/test_server.py::test_s3_server_put_ipv4 --deselect tests/test_s3bucket_path/test_server.py::test_s3_server_put_ipv6 --deselect tests/test_s3/test_server.py::test_s3_server_bucket_create --deselect tests/test_s3/test_server.py::test_s3_server_bucket_versioning --deselect tests/test_s3/test_server.py::test_s3_server_get --deselect tests/test_s3/test_server.py::test_s3_server_ignore_subdomain_for_bucketnames --deselect tests/test_s3/test_server.py::test_s3_server_post_cors --deselect tests/test_s3/test_server.py::test_s3_server_post_to_bucket --deselect tests/test_s3/test_server.py::test_s3_server_post_unicode_bucket_key --deselect tests/test_s3/test_server.py::test_s3_server_post_without_content_length --deselect tests/test_utilities/test_threaded_server.py::test_threaded_moto_server__different_port --deselect tests/test_utilities/test_threaded_server.py::TestThreadedMotoServer::test_load_data_from_inmemory_client --deselect tests/test_utilities/test_threaded_server.py::TestThreadedMotoServer::test_server_can_handle_multiple_services --deselect tests/test_utilities/test_threaded_server.py::TestThreadedMotoServer::test_server_is_reachable =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/moto-3.1.10, configfile: setup.cfg collected 5977 items / 86 deselected / 5891 selected tests/test_acm/test_acm.py ........................... [ 0%] tests/test_apigateway/test_apigateway.py ..................................................................... [ 1%] tests/test_apigateway/test_apigateway_deployments.py .......... [ 1%] tests/test_apigateway/test_apigateway_gatewayresponses.py ........ [ 1%] tests/test_apigateway/test_apigateway_importrestapi.py ... [ 1%] tests/test_apigateway/test_apigateway_integration.py .... [ 2%] tests/test_apigateway/test_apigateway_putrestapi.py ........ [ 2%] tests/test_apigateway/test_apigateway_stage.py ............... [ 2%] tests/test_apigateway/test_apigateway_validators.py ..... [ 2%] tests/test_apigateway/test_apigateway_vpclink.py ...... [ 2%] tests/test_apigatewayv2/test_apigatewayv2.py ........... [ 2%] tests/test_apigatewayv2/test_apigatewayv2_authorizers.py ....... [ 2%] tests/test_apigatewayv2/test_apigatewayv2_integrationresponses.py ....... [ 3%] tests/test_apigatewayv2/test_apigatewayv2_integrations.py ........... [ 3%] tests/test_apigatewayv2/test_apigatewayv2_models.py ...... [ 3%] tests/test_apigatewayv2/test_apigatewayv2_reimport.py .... [ 3%] tests/test_apigatewayv2/test_apigatewayv2_routes.py ............... [ 3%] tests/test_apigatewayv2/test_apigatewayv2_tags.py .... [ 3%] tests/test_apigatewayv2/test_apigatewayv2_vpclinks.py ........ [ 3%] tests/test_applicationautoscaling/test_applicationautoscaling.py ............... [ 4%] tests/test_applicationautoscaling/test_validation.py ....... [ 4%] tests/test_appsync/test_appsync.py ....... [ 4%] tests/test_appsync/test_appsync_apikeys.py ....... [ 4%] tests/test_appsync/test_appsync_schema.py .... [ 4%] tests/test_appsync/test_appsync_tags.py ...... [ 4%] tests/test_athena/test_athena.py .......... [ 4%] tests/test_autoscaling/test_autoscaling.py ............................................................... [ 5%] tests/test_autoscaling/test_autoscaling_tags.py ...... [ 5%] tests/test_autoscaling/test_elbv2.py .. [ 6%] tests/test_autoscaling/test_launch_configurations.py ............ [ 6%] tests/test_autoscaling/test_policies.py .......... [ 6%] tests/test_autoscaling/test_server.py . [ 6%] tests/test_batch/test_batch.py .. [ 6%] tests/test_batch/test_batch_compute_envs.py .......... [ 6%] tests/test_batch/test_batch_job_queue.py ........ [ 6%] tests/test_batch/test_batch_jobs.py ..... [ 6%] tests/test_batch/test_batch_tags_job_definition.py ... [ 6%] tests/test_batch/test_batch_tags_job_queue.py .... [ 6%] tests/test_batch/test_batch_task_definition.py ................. [ 7%] tests/test_batch_simple/test_batch_compute_envs.py .. [ 7%] tests/test_batch_simple/test_batch_jobs.py .. [ 7%] tests/test_budgets/test_budgets.py ........ [ 7%] tests/test_budgets/test_notifications.py ..... [ 7%] tests/test_budgets/test_server.py . [ 7%] tests/test_cloudfront/test_cloudfront.py ..... [ 7%] tests/test_cloudfront/test_cloudfront_distributions.py .............. [ 7%] tests/test_cloudtrail/test_cloudtrail.py ........................... [ 8%] tests/test_cloudtrail/test_cloudtrail_eventselectors.py ........ [ 8%] tests/test_cloudtrail/test_cloudtrail_tags.py .... [ 8%] tests/test_cloudtrail/test_server.py . [ 8%] tests/test_cloudwatch/test_cloudwatch_alarms.py ...... [ 8%] tests/test_cloudwatch/test_cloudwatch_boto3.py ........................ [ 9%] tests/test_cloudwatch/test_cloudwatch_dashboards.py ...... [ 9%] tests/test_cloudwatch/test_cloudwatch_tags.py ...... [ 9%] tests/test_codecommit/test_codecommit.py ........ [ 9%] tests/test_codepipeline/test_codepipeline.py .............. [ 9%] tests/test_cognitoidentity/test_cognitoidentity.py .................... [ 9%] tests/test_cognitoidentity/test_server.py ... [ 10%] tests/test_cognitoidp/test_cognitoidp.py ........................................................................................................................... [ 12%] ............................................. [ 12%] tests/test_config/test_config.py ............................... [ 13%] tests/test_config/test_config_rules.py ........ [ 13%] tests/test_config/test_config_tags.py ... [ 13%] tests/test_core/test_auth.py ..................... [ 13%] tests/test_core/test_context_manager.py . [ 13%] tests/test_core/test_decorator_calls.py ........................... [ 14%] tests/test_core/test_environ_patching.py .. [ 14%] tests/test_core/test_importorder.py ...... [ 14%] tests/test_core/test_instance_metadata.py .... [ 14%] tests/test_core/test_mock_regions.py ..... [ 14%] tests/test_core/test_moto_api.py .. [ 14%] tests/test_core/test_nested.py . [ 14%] tests/test_core/test_request_mocking.py ... [ 14%] tests/test_core/test_responses.py .... [ 14%] tests/test_core/test_responses_module.py ... [ 14%] tests/test_core/test_server.py .... [ 15%] tests/test_core/test_settings.py ......... [ 15%] tests/test_core/test_socket.py . [ 15%] tests/test_core/test_url_base_regex.py ............................................................................................... [ 16%] tests/test_core/test_url_mapping.py .. [ 16%] tests/test_core/test_utils.py ........... [ 17%] tests/test_databrew/test_databrew_datasets.py .......... [ 17%] tests/test_databrew/test_databrew_recipes.py ................................ [ 17%] tests/test_databrew/test_databrew_rulesets.py ......... [ 17%] tests/test_datapipeline/test_datapipeline.py ........ [ 18%] tests/test_datapipeline/test_server.py . [ 18%] tests/test_datasync/test_datasync.py ................... [ 18%] tests/test_dax/test_dax.py ............................... [ 18%] tests/test_dax/test_server.py . [ 18%] tests/test_dms/test_dms.py ......... [ 19%] tests/test_ds/test_ds.py ...... [ 19%] tests/test_ds/test_ds_ad_connect.py ....... [ 19%] tests/test_ds/test_ds_microsoft_ad.py ...... [ 19%] tests/test_ds/test_ds_simple_ad_directory.py .... [ 19%] tests/test_ds/test_ds_tags.py ... [ 19%] tests/test_dynamodb/test_dynamodb.py ............................................................................................................................... [ 21%] ................................. [ 22%] tests/test_dynamodb/test_dynamodb_condition_expressions.py ....... [ 22%] tests/test_dynamodb/test_dynamodb_consumedcapacity.py ...... [ 22%] tests/test_dynamodb/test_dynamodb_create_table.py ............ [ 22%] tests/test_dynamodb/test_dynamodb_executor.py ..................... [ 22%] tests/test_dynamodb/test_dynamodb_expression_tokenizer.py .................... [ 23%] tests/test_dynamodb/test_dynamodb_expressions.py ........................................ [ 24%] tests/test_dynamodb/test_dynamodb_table_with_range_key.py ............................. [ 24%] tests/test_dynamodb/test_dynamodb_table_without_range_key.py ........................... [ 24%] tests/test_dynamodb/test_dynamodb_update_table.py ... [ 25%] tests/test_dynamodb/test_dynamodb_validation.py ..................... [ 25%] tests/test_dynamodb/test_server.py . [ 25%] tests/test_dynamodb/exceptions/test_dynamodb_exceptions.py ....................... [ 25%] tests/test_dynamodb/exceptions/test_key_length_exceptions.py ...... [ 25%] tests/test_dynamodb2/test_dynamodb.py .... [ 25%] tests/test_dynamodb_v20111205/test_server.py ......................................... [ 26%] tests/test_dynamodb_v20111205/test_servermode.py ss [ 26%] tests/test_dynamodbstreams/test_dynamodbstreams.py ........ [ 26%] tests/test_ebs/test_ebs.py ........ [ 26%] tests/test_ec2/test_account_attributes.py . [ 26%] tests/test_ec2/test_amazon_dev_pay.py . [ 26%] tests/test_ec2/test_amis.py ..................................... [ 27%] tests/test_ec2/test_availability_zones_and_regions.py .... [ 27%] tests/test_ec2/test_carrier_gateways.py ...... [ 27%] tests/test_ec2/test_customer_gateways.py F.... [ 27%] tests/test_ec2/test_dhcp_options.py ................. [ 28%] tests/test_ec2/test_ec2_integration.py . [ 28%] tests/test_ec2/test_egress_only_igw.py ..... [ 28%] tests/test_ec2/test_elastic_block_store.py ................................... [ 28%] tests/test_ec2/test_elastic_ip_addresses.py ..................... [ 29%] tests/test_ec2/test_elastic_network_interfaces.py ........................... [ 29%] tests/test_ec2/test_flow_logs.py .......... [ 29%] tests/test_ec2/test_general.py .. [ 29%] tests/test_ec2/test_iam_integration.py ....... [ 29%] tests/test_ec2/test_instance_type_offerings.py .... [ 30%] tests/test_ec2/test_instance_types.py .... [ 30%] tests/test_ec2/test_instances.py .................................................................................. [ 31%] tests/test_ec2/test_internet_gateways.py ................. [ 31%] tests/test_ec2/test_ip_addresses.py . [ 31%] tests/test_ec2/test_key_pairs.py ........... [ 31%] tests/test_ec2/test_launch_templates.py ............... [ 32%] tests/test_ec2/test_monitoring.py . [ 32%] tests/test_ec2/test_nat_gateway.py ........ [ 32%] tests/test_ec2/test_network_acls.py .............. [ 32%] tests/test_ec2/test_placement_groups.py . [ 32%] tests/test_ec2/test_prefix_lists.py ............. [ 32%] tests/test_ec2/test_regions.py .... [ 32%] tests/test_ec2/test_reserved_instances.py . [ 32%] tests/test_ec2/test_route_tables.py ...................... [ 33%] tests/test_ec2/test_security_groups.py ............................................ [ 34%] tests/test_ec2/test_server.py ... [ 34%] tests/test_ec2/test_settings.py .... [ 34%] tests/test_ec2/test_spot_fleet.py ............... [ 34%] tests/test_ec2/test_spot_instances.py ............ [ 34%] tests/test_ec2/test_subnets.py ............................. [ 35%] tests/test_ec2/test_tags.py ................. [ 35%] tests/test_ec2/test_transit_gateway.py .............................. [ 35%] tests/test_ec2/test_transit_gateway_peering_attachments.py ...... [ 36%] tests/test_ec2/test_utils.py ... [ 36%] tests/test_ec2/test_virtual_private_gateways.py ................ [ 36%] tests/test_ec2/test_vm_export.py . [ 36%] tests/test_ec2/test_vm_import.py . [ 36%] tests/test_ec2/test_vpc_endpoint_services_integration.py . [ 36%] tests/test_ec2/test_vpc_peering.py ................ [ 36%] tests/test_ec2/test_vpc_service_configuration.py ............... [ 36%] tests/test_ec2/test_vpcs.py .............................................. [ 37%] tests/test_ec2/test_vpn_connections.py ...... [ 37%] tests/test_ec2/test_windows.py . [ 37%] tests/test_ec2instanceconnect/test_ec2instanceconnect_boto3.py . [ 37%] tests/test_ecr/test_ecr_boto3.py ......................................................................................... [ 39%] tests/test_ecr/test_ecr_policy_validation.py ...................... [ 39%] tests/test_ecs/test_ecs_account_settings.py ............. [ 39%] tests/test_ecs/test_ecs_boto3.py ............................................................................ [ 41%] tests/test_ecs/test_ecs_capacity_provider.py ...... [ 41%] tests/test_efs/test_access_point_tagging.py .... [ 41%] tests/test_efs/test_access_points.py ...... [ 41%] tests/test_efs/test_file_system.py ................. [ 41%] tests/test_efs/test_filesystem_tagging.py .... [ 41%] tests/test_efs/test_lifecycle_config.py ... [ 41%] tests/test_efs/test_mount_target.py ................... [ 42%] tests/test_efs/test_mount_target_security_groups.py .... [ 42%] tests/test_efs/test_server.py ....... [ 42%] tests/test_eks/test_eks.py ...................................................................................... [ 43%] tests/test_elasticache/test_elasticache.py .......... [ 44%] tests/test_elasticache/test_server.py . [ 44%] tests/test_elasticbeanstalk/test_eb.py ........ [ 44%] tests/test_elastictranscoder/test_elastictranscoder.py ................ [ 44%] tests/test_elb/test_elb.py ........................................ [ 45%] tests/test_elb/test_elb_availabilityzones.py . [ 45%] tests/test_elb/test_elb_policies.py .......... [ 45%] tests/test_elb/test_elb_subnets.py .. [ 45%] tests/test_elb/test_server.py . [ 45%] tests/test_elbv2/test_elbv2.py ........................................ [ 46%] tests/test_elbv2/test_elbv2_integration.py . [ 46%] tests/test_elbv2/test_elbv2_listener_rule_tags.py .. [ 46%] tests/test_elbv2/test_elbv2_listener_rules.py ...................................... [ 46%] tests/test_elbv2/test_elbv2_listener_tags.py .. [ 46%] tests/test_elbv2/test_elbv2_set_subnets.py .. [ 46%] tests/test_elbv2/test_elbv2_target_groups.py ............................ [ 47%] tests/test_elbv2/test_server.py . [ 47%] tests/test_emr/test_emr_boto3.py ............................ [ 47%] tests/test_emr/test_emr_integration.py ...... [ 47%] tests/test_emr/test_server.py . [ 47%] tests/test_emr/test_utils.py .. [ 47%] tests/test_emrcontainers/test_emrcontainers.py .......................................................... [ 48%] tests/test_es/test_es.py ............... [ 49%] tests/test_events/test_event_pattern.py ............ [ 49%] tests/test_events/test_events.py ....................................................................................................... [ 51%] tests/test_events/test_events_integration.py ..... [ 51%] tests/test_firehose/test_firehose.py ....... [ 51%] tests/test_firehose/test_firehose_destination_types.py ..... [ 51%] tests/test_firehose/test_firehose_put.py ..... [ 51%] tests/test_firehose/test_firehose_tags.py ... [ 51%] tests/test_forecast/test_forecast.py ..................... [ 51%] tests/test_glacier/test_glacier_archives.py ... [ 52%] tests/test_glacier/test_glacier_jobs.py .... [ 52%] tests/test_glacier/test_glacier_vaults.py .... [ 52%] tests/test_glue/test_datacatalog.py ................................................. [ 52%] tests/test_glue/test_glue.py .............................. [ 53%] tests/test_glue/test_partition_filter.py ....... [ 53%] tests/test_guardduty/test_guardduty.py .... [ 53%] tests/test_guardduty/test_server.py . [ 53%] tests/test_iam/test_iam.py ......................................................................................................................................... [ 56%] .. [ 56%] tests/test_iam/test_iam_account_aliases.py . [ 56%] tests/test_iam/test_iam_groups.py ...................... [ 56%] tests/test_iam/test_iam_oidc.py .................. [ 56%] tests/test_iam/test_iam_policies.py ................................................................................................................................ [ 58%] [ 58%] tests/test_iam/test_iam_server_certificates.py ..... [ 59%] tests/test_iam/test_server.py . [ 59%] tests/test_iot/test_iot.py .... [ 59%] tests/test_iot/test_iot_ca_certificates.py ......... [ 59%] tests/test_iot/test_iot_certificates.py ............. [ 59%] tests/test_iot/test_iot_deprecate_thing_type.py .... [ 59%] tests/test_iot/test_iot_domain_configuration.py ............ [ 59%] tests/test_iot/test_iot_job_executions.py ...... [ 59%] tests/test_iot/test_iot_jobs.py ........ [ 59%] tests/test_iot/test_iot_policies.py ....... [ 60%] tests/test_iot/test_iot_search.py ....... [ 60%] tests/test_iot/test_iot_thing_groups.py ........... [ 60%] tests/test_iot/test_iot_thing_types.py ..... [ 60%] tests/test_iot/test_iot_things.py ....... [ 60%] tests/test_iot/test_iot_topic_rules.py ....... [ 60%] tests/test_iot/test_server.py ... [ 60%] tests/test_kinesis/test_kinesis.py .............................. [ 61%] tests/test_kinesis/test_kinesis_boto3.py ................ [ 61%] tests/test_kinesis/test_kinesis_encryption.py .. [ 61%] tests/test_kinesis/test_kinesis_monitoring.py ..... [ 61%] tests/test_kinesis/test_kinesis_stream_consumers.py ....... [ 61%] tests/test_kinesis/test_server.py . [ 61%] tests/test_kinesisvideo/test_kinesisvideo.py ........ [ 61%] tests/test_kinesisvideo/test_server.py . [ 61%] tests/test_kinesisvideoarchivedmedia/test_kinesisvideoarchivedmedia.py ... [ 62%] tests/test_kinesisvideoarchivedmedia/test_server.py . [ 62%] tests/test_kms/test_kms_boto3.py ............................................................................................................ [ 63%] tests/test_kms/test_server.py . [ 63%] tests/test_kms/test_utils.py ................. [ 64%] tests/test_logs/test_logs.py ............................................................. [ 65%] tests/test_logs/test_models.py . [ 65%] tests/test_managedblockchain/test_managedblockchain_invitations.py ... [ 65%] tests/test_managedblockchain/test_managedblockchain_members.py ............... [ 65%] tests/test_managedblockchain/test_managedblockchain_networks.py ...... [ 65%] tests/test_managedblockchain/test_managedblockchain_nodes.py ................. [ 65%] tests/test_managedblockchain/test_managedblockchain_proposals.py ......... [ 66%] tests/test_managedblockchain/test_managedblockchain_proposalvotes.py ............. [ 66%] tests/test_mediaconnect/test_mediaconnect.py ............... [ 66%] tests/test_medialive/test_medialive.py ............ [ 66%] tests/test_mediapackage/test_mediapackage.py .............. [ 66%] tests/test_mediastore/test_mediastore.py ..................... [ 67%] tests/test_mediastoredata/test_mediastoredata.py ...... [ 67%] tests/test_moto_api/state_manager/test_batch_integration.py .. [ 67%] tests/test_moto_api/state_manager/test_managed_state_model.py ....... [ 67%] tests/test_moto_api/state_manager/test_state_manager.py ....... [ 67%] tests/test_moto_api/state_manager/servermode/test_inmemory_server.py ... [ 67%] tests/test_moto_api/state_manager/servermode/test_state_manager.py sss [ 67%] tests/test_mq/test_mq.py ................ [ 68%] tests/test_mq/test_mq_configuration.py .......... [ 68%] tests/test_mq/test_mq_tags.py ..... [ 68%] tests/test_mq/test_mq_users.py ....... [ 68%] tests/test_opsworks/test_apps.py .. [ 68%] tests/test_opsworks/test_instances.py ... [ 68%] tests/test_opsworks/test_layers.py .. [ 68%] tests/test_opsworks/test_stack.py .. [ 68%] tests/test_organizations/test_organizations_boto3.py ......................................................................................... [ 70%] tests/test_pinpoint/test_pinpoint.py ....... [ 70%] tests/test_pinpoint/test_pinpoint_application_tags.py .... [ 70%] tests/test_pinpoint/test_pinpoint_event_stream.py ... [ 70%] tests/test_polly/test_polly.py ............. [ 70%] tests/test_quicksight/test_quicksight_datasets.py .. [ 70%] tests/test_quicksight/test_quicksight_groups.py ...... [ 70%] tests/test_quicksight/test_quicksight_users.py ......... [ 70%] tests/test_ram/test_ram.py ............ [ 71%] tests/test_rds/test_filters.py .......................... [ 71%] tests/test_rds/test_rds.py ........................................................................................ [ 73%] tests/test_rds/test_rds_clusters.py .............................. [ 73%] tests/test_rds/test_rds_event_subscriptions.py ...... [ 73%] tests/test_rds/test_rds_export_tasks.py ....... [ 73%] tests/test_rds/test_server.py .. [ 73%] tests/test_rds/test_utils.py ............. [ 73%] tests/test_rds2/test_rds2.py .. [ 74%] tests/test_redshift/test_redshift.py .................................................................. [ 75%] tests/test_redshift/test_server.py ..FFFFFFFF..FF [ 75%] tests/test_redshiftdata/test_redshiftdata.py ......... [ 75%] tests/test_redshiftdata/test_server.py ........ [ 75%] tests/test_rekognition/test_rekognition.py .... [ 75%] tests/test_resourcegroups/test_resourcegroups.py ............ [ 75%] tests/test_route53/test_route53.py ................................ [ 76%] tests/test_route53/test_route53_boto3.py .... [ 76%] tests/test_route53/test_route53_delegationsets.py ........ [ 76%] tests/test_route53/test_route53_query_logging_config.py ...... [ 76%] tests/test_route53resolver/test_route53resolver_endpoint.py ................. [ 77%] tests/test_route53resolver/test_route53resolver_rule.py ........... [ 77%] tests/test_route53resolver/test_route53resolver_rule_associations.py ........... [ 77%] tests/test_route53resolver/test_route53resolver_tags.py .... [ 77%] tests/test_s3/test_s3.py ................................................................................................................................... [ 79%] tests/test_s3/test_s3_acl.py .......................... [ 80%] tests/test_s3/test_s3_auth.py .... [ 80%] tests/test_s3/test_s3_classdecorator.py . [ 80%] tests/test_s3/test_s3_config.py ...... [ 80%] tests/test_s3/test_s3_copyobject.py ................ [ 80%] tests/test_s3/test_s3_custom_endpoint.py ........ [ 80%] tests/test_s3/test_s3_encryption.py ..... [ 80%] tests/test_s3/test_s3_lifecycle.py ........ [ 81%] tests/test_s3/test_s3_lock.py ..... [ 81%] tests/test_s3/test_s3_metadata.py . [ 81%] tests/test_s3/test_s3_multipart.py ............................. [ 81%] tests/test_s3/test_s3_replication.py ....... [ 81%] tests/test_s3/test_s3_storageclass.py ............ [ 81%] tests/test_s3/test_s3_tagging.py ........... [ 82%] tests/test_s3/test_s3_utils.py ............ [ 82%] tests/test_s3bucket_path/test_s3bucket_path_utils.py ... [ 82%] tests/test_s3control/test_s3control.py . [ 82%] tests/test_s3control/test_s3control_access_points.py ..... [ 82%] tests/test_s3control/test_s3control_accesspoint_policy.py ..... [ 82%] tests/test_s3control/test_s3control_config_integration.py .. [ 82%] tests/test_s3control/test_s3control_s3.py .. [ 82%] tests/test_sagemaker/test_sagemaker_endpoint.py ............. [ 82%] tests/test_sagemaker/test_sagemaker_experiment.py ..... [ 82%] tests/test_sagemaker/test_sagemaker_models.py .......... [ 83%] tests/test_sagemaker/test_sagemaker_notebooks.py ........ [ 83%] tests/test_sagemaker/test_sagemaker_processing.py .......... [ 83%] tests/test_sagemaker/test_sagemaker_search.py .. [ 83%] tests/test_sagemaker/test_sagemaker_training.py ........... [ 83%] tests/test_sagemaker/test_sagemaker_trial.py ....... [ 83%] tests/test_sagemaker/test_sagemaker_trial_component.py ........ [ 83%] tests/test_sdb/test_sdb_attributes.py ......... [ 84%] tests/test_sdb/test_sdb_domains.py ................. [ 84%] tests/test_sdb/test_server.py . [ 84%] tests/test_secretsmanager/test_list_secrets.py ............... [ 84%] tests/test_secretsmanager/test_secretsmanager.py .................................................................................... [ 86%] tests/test_servicediscovery/test_server.py . [ 86%] tests/test_servicediscovery/test_servicediscovery_httpnamespaces.py ........... [ 86%] tests/test_servicediscovery/test_servicediscovery_operations.py ....... [ 86%] tests/test_servicediscovery/test_servicediscovery_service.py ....... [ 86%] tests/test_servicediscovery/test_servicediscovery_tags.py ...... [ 86%] tests/test_ses/test_server.py .. [ 86%] tests/test_ses/test_ses_boto3.py .................................. [ 87%] tests/test_ses/test_ses_sns_boto3.py ........ [ 87%] tests/test_ses/test_ses_utils.py . [ 87%] tests/test_sns/test_application_boto3.py ................... [ 87%] tests/test_sns/test_publish_batch.py ....... [ 87%] tests/test_sns/test_publishing_boto3.py .......................................... [ 88%] tests/test_sns/test_server.py . [ 88%] tests/test_sns/test_subscriptions_boto3.py ................... [ 88%] tests/test_sns/test_topics_boto3.py ......................... [ 89%] tests/test_sqs/test_server.py .. [ 89%] tests/test_sqs/test_sqs.py ......................................................................................................................... [ 91%] tests/test_ssm/test_ssm_boto3.py ............................................................................... [ 92%] tests/test_ssm/test_ssm_defaults.py .. [ 92%] tests/test_ssm/test_ssm_doc_permissions.py ...................... [ 93%] tests/test_ssm/test_ssm_docs.py ........ [ 93%] tests/test_ssm/test_ssm_maintenance_windows.py ...... [ 93%] tests/test_ssm/test_ssm_parameterstore.py ........ [ 93%] tests/test_ssm/test_ssm_secretsmanager.py ...... [ 93%] tests/test_ssm/test_ssm_utils.py ... [ 93%] tests/test_ssoadmin/test_server.py . [ 93%] tests/test_ssoadmin/test_ssoadmin.py .... [ 93%] tests/test_stepfunctions/test_stepfunctions.py ............................................ [ 94%] tests/test_sts/test_server.py .... [ 94%] tests/test_sts/test_sts.py ............... [ 94%] tests/test_support/test_server.py .... [ 94%] tests/test_support/test_support.py ......................................... [ 95%] tests/test_swf/test_exceptions.py ............ [ 95%] tests/test_swf/test_utils.py . [ 95%] tests/test_swf/models/test_activity_task.py ....... [ 95%] tests/test_swf/models/test_decision_task.py ..... [ 95%] tests/test_swf/models/test_domain.py ........ [ 96%] tests/test_swf/models/test_generic_type.py .... [ 96%] tests/test_swf/models/test_history_event.py ... [ 96%] tests/test_swf/models/test_timeout.py . [ 96%] tests/test_swf/models/test_timer.py .... [ 96%] tests/test_swf/models/test_workflow_execution.py ................................. [ 96%] tests/test_swf/responses/test_activity_tasks.py ............. [ 97%] tests/test_swf/responses/test_activity_types.py ............. [ 97%] tests/test_swf/responses/test_decision_tasks.py ..................... [ 97%] tests/test_swf/responses/test_domains.py ............. [ 97%] tests/test_swf/responses/test_timeouts.py ... [ 97%] tests/test_swf/responses/test_workflow_executions.py ............. [ 98%] tests/test_swf/responses/test_workflow_types.py ............. [ 98%] tests/test_textract/test_server.py .... [ 98%] tests/test_textract/test_textract.py .... [ 98%] tests/test_timestreamwrite/test_server.py . [ 98%] tests/test_timestreamwrite/test_timestreamwrite_database.py ....... [ 98%] tests/test_timestreamwrite/test_timestreamwrite_table.py .......... [ 98%] tests/test_timestreamwrite/test_timestreamwrite_tagging.py ..... [ 98%] tests/test_transcribe/test_transcribe_boto3.py ....................... [ 99%] tests/test_utilities/test_docker_utilities.py ....... [ 99%] tests/test_utilities/test_paginator.py ................... [ 99%] tests/test_utilities/test_tagging_service.py ........... [ 99%] tests/test_utilities/test_threaded_server.py F [ 99%] tests/test_wafv2/test_server.py .. [ 99%] tests/test_wafv2/test_utils.py . [ 99%] tests/test_wafv2/test_wafv2.py .. [100%] ================================================================================= FAILURES ================================================================================= ___________________________________________________________________ test_create_customer_gateways_boto3 ____________________________________________________________________ self = , args = ('205.251.242.54',), kw = {} @wraps(func) def wrapper(self, *args, **kw): try: > value = func(self, *args, **kw) /usr/lib/python3.8/site-packages/sure/__init__.py:408: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , what = '205.251.242.54', epsilon = None @assertionmethod def equal(self, what, epsilon=None): """compares given object ``X`` with an expected ``Y`` object. It primarily assures that the compared objects are absolute equal ``==``. :param what: the expected value :param epsilon: a delta to leverage upper-bound floating point permissiveness """ try: comparison = DeepComparison(self.obj, what, epsilon).compare() error = False except AssertionError as e: error = e comparison = None if isinstance(comparison, DeepExplanation): error = comparison.get_assertion(self.obj, what) if self.negative: if error: return True msg = "%s should differ from %s, but is the same thing" raise AssertionError(msg % (safe_repr(self.obj), safe_repr(what))) else: if not error: return True > raise error /usr/lib/python3.8/site-packages/sure/__init__.py:729: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , what = '205.251.242.54', epsilon = None @assertionmethod def equal(self, what, epsilon=None): """compares given object ``X`` with an expected ``Y`` object. It primarily assures that the compared objects are absolute equal ``==``. :param what: the expected value :param epsilon: a delta to leverage upper-bound floating point permissiveness """ try: > comparison = DeepComparison(self.obj, what, epsilon).compare() /usr/lib/python3.8/site-packages/sure/__init__.py:710: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def compare(self): X, Y = self.operands if isinstance(X, _CallList): X = list(X) if isinstance(Y, _CallList): X = list(Y) c = self.get_context() if self.is_complex(X) and type(X) is type(Y): return self.compare_complex_stuff(X, Y) def safe_format_repr(string): "Escape '{' and '}' in string for use with str.format()" if not isinstance(string, (string_types, binary_type)): return string orig_str_type = type(string) if isinstance(string, binary_type): safe_repr = string.replace(b'{', b'{{').replace(b'}', b'}}') else: safe_repr = string.replace('{', '{{').replace('}', '}}') # NOTE: str.replace() automatically converted the 'string' to 'unicode' in Python 2 return orig_str_type(safe_repr) # get safe representation for X and Y safe_X, safe_Y = safe_format_repr(X), safe_format_repr(Y) # maintaining backwards compatibility between error messages kwargs = {} if self.is_simple(X) and self.is_simple(Y): kwargs['msg_format'] = 'X{{0}} is {0!r} whereas Y{{1}} is {1!r}'.format(safe_X, safe_Y) elif type(X) is not type(Y): kwargs['msg_format'] = 'X{{0}} is a {0} and Y{{1}} is a {1} instead'.format( type(X).__name__, type(Y).__name__) exp = self.compare_generic(X, Y, **kwargs) if isinstance(exp, DeepExplanation): original_X, original_Y = c.parent.operands > raise exp.as_assertion(original_X, original_Y) /usr/lib/python3.8/site-packages/sure/core.py:254: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = "X is 'None' whereas Y is '205.251.242.54'", X = 'None', Y = '205.251.242.54' def as_assertion(self, X, Y): > raise self.get_assertion(X, Y) E AssertionError: given E X = 'None' E and E Y = '205.251.242.54' E X is 'None' whereas Y is '205.251.242.54' /usr/lib/python3.8/site-packages/sure/core.py:57: AssertionError During handling of the above exception, another exception occurred: @mock_ec2 def test_create_customer_gateways_boto3(): ec2 = boto3.client("ec2", region_name="us-east-1") customer_gateway = create_customer_gateway(ec2) customer_gateway.should.have.key("CustomerGatewayId").match(r"cgw-\w+") customer_gateway.should.have.key("Type").equal("ipsec.1") customer_gateway.should.have.key("BgpAsn").equal("65534") > customer_gateway.should.have.key("IpAddress").equal("205.251.242.54") tests/test_ec2/test_customer_gateways.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ('205.251.242.54',), kw = {} @wraps(func) def wrapper(self, *args, **kw): try: value = func(self, *args, **kw) except AssertionError as e: > raise AssertionError(e) E AssertionError: given E X = 'None' E and E Y = '205.251.242.54' E X is 'None' whereas Y is '205.251.242.54' /usr/lib/python3.8/site-packages/sure/__init__.py:410: AssertionError ________________________________________________________________________ test_create_cluster[JSON] _________________________________________________________________________ is_json = True @pytest.mark.parametrize("is_json", [True, False], ids=["JSON", "XML"]) @mock_redshift def test_create_cluster(is_json): backend = server.create_backend_app("redshift") test_client = backend.test_client() create_params = ( "?Action=CreateCluster" "&ClusterIdentifier=examplecluster" "&MasterUsername=masteruser" "&MasterUserPassword=12345678Aa" "&NodeType=ds2.xlarge" ) if is_json: create_params += "&ContentType=JSON" res = test_client.post(create_params) result = res.data.decode("utf-8") if is_json: > result = json.loads(result) tests/test_redshift/test_server.py:59: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.8/json/__init__.py:357: in loads return _default_decoder.decode(s) /usr/lib64/python3.8/json/decoder.py:337: in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = s = '\n\n404 Not Found\n

Not Found

\n

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

\n' idx = 0 def raw_decode(self, s, idx=0): """Decode a JSON document from ``s`` (a ``str`` beginning with a JSON document) and return a 2-tuple of the Python representation and the index in ``s`` where the document ended. This can be used to decode a JSON document from a string that may have extraneous data at the end. """ try: obj, end = self.scan_once(s, idx) except StopIteration as err: > raise JSONDecodeError("Expecting value", s, err.value) from None E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) /usr/lib64/python3.8/json/decoder.py:355: JSONDecodeError _________________________________________________________________________ test_create_cluster[XML] _________________________________________________________________________ is_json = False @pytest.mark.parametrize("is_json", [True, False], ids=["JSON", "XML"]) @mock_redshift def test_create_cluster(is_json): backend = server.create_backend_app("redshift") test_client = backend.test_client() create_params = ( "?Action=CreateCluster" "&ClusterIdentifier=examplecluster" "&MasterUsername=masteruser" "&MasterUserPassword=12345678Aa" "&NodeType=ds2.xlarge" ) if is_json: create_params += "&ContentType=JSON" res = test_client.post(create_params) result = res.data.decode("utf-8") if is_json: result = json.loads(result) else: > result = xmltodict.parse(result, dict_constructor=dict) tests/test_redshift/test_server.py:61: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ xml_input = b'\n\n404 Not Found\n

Not Found

\n

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

\n' encoding = 'utf-8', expat = , process_namespaces = False, namespace_separator = None disable_entities = True, kwargs = {'dict_constructor': }, handler = parser = , feature = 'http://apache.org/xml/features/disallow-doctype-decl' def parse(xml_input, encoding=None, expat=expat, process_namespaces=False, namespace_separator=':', disable_entities=True, **kwargs): """Parse the given XML input and convert it into a dictionary. `xml_input` can either be a `string` or a file-like object. If `xml_attribs` is `True`, element attributes are put in the dictionary among regular child elements, using `@` as a prefix to avoid collisions. If set to `False`, they are just ignored. Simple example:: >>> import xmltodict >>> doc = xmltodict.parse(\"\"\" ... ... 1 ... 2 ... ... \"\"\") >>> doc['a']['@prop'] u'x' >>> doc['a']['b'] [u'1', u'2'] If `item_depth` is `0`, the function returns a dictionary for the root element (default behavior). Otherwise, it calls `item_callback` every time an item at the specified depth is found and returns `None` in the end (streaming mode). The callback function receives two parameters: the `path` from the document root to the item (name-attribs pairs), and the `item` (dict). If the callback's return value is false-ish, parsing will be stopped with the :class:`ParsingInterrupted` exception. Streaming example:: >>> def handle(path, item): ... print('path:%s item:%s' % (path, item)) ... return True ... >>> xmltodict.parse(\"\"\" ... ... 1 ... 2 ... \"\"\", item_depth=2, item_callback=handle) path:[(u'a', {u'prop': u'x'}), (u'b', None)] item:1 path:[(u'a', {u'prop': u'x'}), (u'b', None)] item:2 The optional argument `postprocessor` is a function that takes `path`, `key` and `value` as positional arguments and returns a new `(key, value)` pair where both `key` and `value` may have changed. Usage example:: >>> def postprocessor(path, key, value): ... try: ... return key + ':int', int(value) ... except (ValueError, TypeError): ... return key, value >>> xmltodict.parse('12x', ... postprocessor=postprocessor) OrderedDict([(u'a', OrderedDict([(u'b:int', [1, 2]), (u'b', u'x')]))]) You can pass an alternate version of `expat` (such as `defusedexpat`) by using the `expat` parameter. E.g: >>> import defusedexpat >>> xmltodict.parse('hello', expat=defusedexpat.pyexpat) OrderedDict([(u'a', u'hello')]) You can use the force_list argument to force lists to be created even when there is only a single child of a given level of hierarchy. The force_list argument is a tuple of keys. If the key for a given level of hierarchy is in the force_list argument, that level of hierarchy will have a list as a child (even if there is only one sub-element). The index_keys operation takes precendence over this. This is applied after any user-supplied postprocessor has already run. For example, given this input: host1 Linux em0 10.0.0.1 If called with force_list=('interface',), it will produce this dictionary: {'servers': {'server': {'name': 'host1', 'os': 'Linux'}, 'interfaces': {'interface': [ {'name': 'em0', 'ip_address': '10.0.0.1' } ] } } } `force_list` can also be a callable that receives `path`, `key` and `value`. This is helpful in cases where the logic that decides whether a list should be forced is more complex. """ handler = _DictSAXHandler(namespace_separator=namespace_separator, **kwargs) if isinstance(xml_input, _unicode): if not encoding: encoding = 'utf-8' xml_input = xml_input.encode(encoding) if not process_namespaces: namespace_separator = None parser = expat.ParserCreate( encoding, namespace_separator ) try: parser.ordered_attributes = True except AttributeError: # Jython's expat does not support ordered_attributes pass parser.StartNamespaceDeclHandler = handler.startNamespaceDecl parser.StartElementHandler = handler.startElement parser.EndElementHandler = handler.endElement parser.CharacterDataHandler = handler.characters parser.buffer_text = True if disable_entities: try: # Attempt to disable DTD in Jython's expat parser (Xerces-J). feature = "http://apache.org/xml/features/disallow-doctype-decl" parser._reader.setFeature(feature, True) except AttributeError: # For CPython / expat parser. # Anything not handled ends up here and entities aren't expanded. parser.DefaultHandler = lambda x: None # Expects an integer return; zero means failure -> expat.ExpatError. parser.ExternalEntityRefHandler = lambda *x: 1 if hasattr(xml_input, 'read'): parser.ParseFile(xml_input) else: > parser.Parse(xml_input, True) E xml.parsers.expat.ExpatError: syntax error: line 1, column 0 /usr/lib/python3.8/site-packages/xmltodict.py:327: ExpatError ________________________________________________________________ test_create_cluster_multiple_params[JSON] _________________________________________________________________ is_json = True @pytest.mark.parametrize("is_json", [True, False], ids=["JSON", "XML"]) @mock_redshift def test_create_cluster_multiple_params(is_json): backend = server.create_backend_app("redshift") test_client = backend.test_client() create_params = ( "?Action=CreateCluster" "&ClusterIdentifier=examplecluster" "&MasterUsername=masteruser" "&MasterUserPassword=12345678Aa" "&NumberOfNodes=3" "&NodeType=ds2.xlarge" "&EnhancedVpcRouting=True" "&Tags.Tag.1.Key=key1" "&Tags.Tag.1.Value=val1" "&Tags.Tag.2.Key=key2" "&Tags.Tag.2.Value=val2" "&DBName=testdb" "&Encrypted=True" "&ClusterVersion=2.0" "&Port=1234" ) if is_json: create_params += "&ContentType=JSON" res = test_client.post(create_params) result = res.data.decode("utf-8") if is_json: > result = json.loads(result) tests/test_redshift/test_server.py:120: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.8/json/__init__.py:357: in loads return _default_decoder.decode(s) /usr/lib64/python3.8/json/decoder.py:337: in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = s = '\n\n404 Not Found\n

Not Found

\n

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

\n' idx = 0 def raw_decode(self, s, idx=0): """Decode a JSON document from ``s`` (a ``str`` beginning with a JSON document) and return a 2-tuple of the Python representation and the index in ``s`` where the document ended. This can be used to decode a JSON document from a string that may have extraneous data at the end. """ try: obj, end = self.scan_once(s, idx) except StopIteration as err: > raise JSONDecodeError("Expecting value", s, err.value) from None E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) /usr/lib64/python3.8/json/decoder.py:355: JSONDecodeError _________________________________________________________________ test_create_cluster_multiple_params[XML] _________________________________________________________________ is_json = False @pytest.mark.parametrize("is_json", [True, False], ids=["JSON", "XML"]) @mock_redshift def test_create_cluster_multiple_params(is_json): backend = server.create_backend_app("redshift") test_client = backend.test_client() create_params = ( "?Action=CreateCluster" "&ClusterIdentifier=examplecluster" "&MasterUsername=masteruser" "&MasterUserPassword=12345678Aa" "&NumberOfNodes=3" "&NodeType=ds2.xlarge" "&EnhancedVpcRouting=True" "&Tags.Tag.1.Key=key1" "&Tags.Tag.1.Value=val1" "&Tags.Tag.2.Key=key2" "&Tags.Tag.2.Value=val2" "&DBName=testdb" "&Encrypted=True" "&ClusterVersion=2.0" "&Port=1234" ) if is_json: create_params += "&ContentType=JSON" res = test_client.post(create_params) result = res.data.decode("utf-8") if is_json: result = json.loads(result) else: > result = xmltodict.parse(result, dict_constructor=dict) tests/test_redshift/test_server.py:122: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ xml_input = b'\n\n404 Not Found\n

Not Found

\n

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

\n' encoding = 'utf-8', expat = , process_namespaces = False, namespace_separator = None disable_entities = True, kwargs = {'dict_constructor': }, handler = parser = , feature = 'http://apache.org/xml/features/disallow-doctype-decl' def parse(xml_input, encoding=None, expat=expat, process_namespaces=False, namespace_separator=':', disable_entities=True, **kwargs): """Parse the given XML input and convert it into a dictionary. `xml_input` can either be a `string` or a file-like object. If `xml_attribs` is `True`, element attributes are put in the dictionary among regular child elements, using `@` as a prefix to avoid collisions. If set to `False`, they are just ignored. Simple example:: >>> import xmltodict >>> doc = xmltodict.parse(\"\"\" ... ... 1 ... 2 ... ... \"\"\") >>> doc['a']['@prop'] u'x' >>> doc['a']['b'] [u'1', u'2'] If `item_depth` is `0`, the function returns a dictionary for the root element (default behavior). Otherwise, it calls `item_callback` every time an item at the specified depth is found and returns `None` in the end (streaming mode). The callback function receives two parameters: the `path` from the document root to the item (name-attribs pairs), and the `item` (dict). If the callback's return value is false-ish, parsing will be stopped with the :class:`ParsingInterrupted` exception. Streaming example:: >>> def handle(path, item): ... print('path:%s item:%s' % (path, item)) ... return True ... >>> xmltodict.parse(\"\"\" ... ... 1 ... 2 ... \"\"\", item_depth=2, item_callback=handle) path:[(u'a', {u'prop': u'x'}), (u'b', None)] item:1 path:[(u'a', {u'prop': u'x'}), (u'b', None)] item:2 The optional argument `postprocessor` is a function that takes `path`, `key` and `value` as positional arguments and returns a new `(key, value)` pair where both `key` and `value` may have changed. Usage example:: >>> def postprocessor(path, key, value): ... try: ... return key + ':int', int(value) ... except (ValueError, TypeError): ... return key, value >>> xmltodict.parse('12x', ... postprocessor=postprocessor) OrderedDict([(u'a', OrderedDict([(u'b:int', [1, 2]), (u'b', u'x')]))]) You can pass an alternate version of `expat` (such as `defusedexpat`) by using the `expat` parameter. E.g: >>> import defusedexpat >>> xmltodict.parse('hello', expat=defusedexpat.pyexpat) OrderedDict([(u'a', u'hello')]) You can use the force_list argument to force lists to be created even when there is only a single child of a given level of hierarchy. The force_list argument is a tuple of keys. If the key for a given level of hierarchy is in the force_list argument, that level of hierarchy will have a list as a child (even if there is only one sub-element). The index_keys operation takes precendence over this. This is applied after any user-supplied postprocessor has already run. For example, given this input: host1 Linux em0 10.0.0.1 If called with force_list=('interface',), it will produce this dictionary: {'servers': {'server': {'name': 'host1', 'os': 'Linux'}, 'interfaces': {'interface': [ {'name': 'em0', 'ip_address': '10.0.0.1' } ] } } } `force_list` can also be a callable that receives `path`, `key` and `value`. This is helpful in cases where the logic that decides whether a list should be forced is more complex. """ handler = _DictSAXHandler(namespace_separator=namespace_separator, **kwargs) if isinstance(xml_input, _unicode): if not encoding: encoding = 'utf-8' xml_input = xml_input.encode(encoding) if not process_namespaces: namespace_separator = None parser = expat.ParserCreate( encoding, namespace_separator ) try: parser.ordered_attributes = True except AttributeError: # Jython's expat does not support ordered_attributes pass parser.StartNamespaceDeclHandler = handler.startNamespaceDecl parser.StartElementHandler = handler.startElement parser.EndElementHandler = handler.endElement parser.CharacterDataHandler = handler.characters parser.buffer_text = True if disable_entities: try: # Attempt to disable DTD in Jython's expat parser (Xerces-J). feature = "http://apache.org/xml/features/disallow-doctype-decl" parser._reader.setFeature(feature, True) except AttributeError: # For CPython / expat parser. # Anything not handled ends up here and entities aren't expanded. parser.DefaultHandler = lambda x: None # Expects an integer return; zero means failure -> expat.ExpatError. parser.ExternalEntityRefHandler = lambda *x: 1 if hasattr(xml_input, 'read'): parser.ParseFile(xml_input) else: > parser.Parse(xml_input, True) E xml.parsers.expat.ExpatError: syntax error: line 1, column 0 /usr/lib/python3.8/site-packages/xmltodict.py:327: ExpatError _________________________________________________________________ test_create_and_describe_clusters[JSON] __________________________________________________________________ self = , args = (2,), kw = {} @wraps(func) def wrapper(self, *args, **kw): try: > value = func(self, *args, **kw) /usr/lib/python3.8/site-packages/sure/__init__.py:408: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , num = 2 @assertionmethod def length_of(self, num): if self.negative: return self._that.len_is_not(num) > return self._that.len_is(num) /usr/lib/python3.8/site-packages/sure/__init__.py:882: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , that = 2 def len_is(self, that): that = self._get_that(that) length = len(self._src) if length != that: error = 'the length of %r should be %d, but is %d' % ( self._src, that, length, ) > raise AssertionError(error) E AssertionError: the length of [] should be 2, but is 0 /usr/lib/python3.8/site-packages/sure/old.py:342: AssertionError During handling of the above exception, another exception occurred: is_json = True @pytest.mark.parametrize("is_json", [True, False], ids=["JSON", "XML"]) @mock_redshift def test_create_and_describe_clusters(is_json): backend = server.create_backend_app("redshift") test_client = backend.test_client() cluster_names = ["examplecluster1", "examplecluster2"] for name in cluster_names: create_params = ( "?Action=CreateCluster" "&ClusterIdentifier=" + name + "&MasterUsername=masteruser" "&MasterUserPassword=12345678Aa" "&NodeType=ds2.xlarge" ) if is_json: create_params += "&ContentType=JSON" test_client.post(create_params) describe_params = "/?Action=DescribeClusters" if is_json: describe_params += "&ContentType=JSON" res = test_client.get(describe_params) result = res.data.decode("utf-8") if is_json: result = json.loads(result) else: result = xmltodict.parse(result, dict_constructor=dict) del result["DescribeClustersResponse"]["ResponseMetadata"] result.should.have.key("DescribeClustersResponse") result["DescribeClustersResponse"].should.have.key("DescribeClustersResult") result["DescribeClustersResponse"]["DescribeClustersResult"].should.have.key( "Clusters" ) result = result["DescribeClustersResponse"]["DescribeClustersResult"]["Clusters"] if not is_json: result = result["item"] > result.should.have.length_of(2) tests/test_redshift/test_server.py:197: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = (2,), kw = {} @wraps(func) def wrapper(self, *args, **kw): try: value = func(self, *args, **kw) except AssertionError as e: > raise AssertionError(e) E AssertionError: the length of [] should be 2, but is 0 /usr/lib/python3.8/site-packages/sure/__init__.py:410: AssertionError __________________________________________________________________ test_create_and_describe_clusters[XML] __________________________________________________________________ is_json = False @pytest.mark.parametrize("is_json", [True, False], ids=["JSON", "XML"]) @mock_redshift def test_create_and_describe_clusters(is_json): backend = server.create_backend_app("redshift") test_client = backend.test_client() cluster_names = ["examplecluster1", "examplecluster2"] for name in cluster_names: create_params = ( "?Action=CreateCluster" "&ClusterIdentifier=" + name + "&MasterUsername=masteruser" "&MasterUserPassword=12345678Aa" "&NodeType=ds2.xlarge" ) if is_json: create_params += "&ContentType=JSON" test_client.post(create_params) describe_params = "/?Action=DescribeClusters" if is_json: describe_params += "&ContentType=JSON" res = test_client.get(describe_params) result = res.data.decode("utf-8") if is_json: result = json.loads(result) else: result = xmltodict.parse(result, dict_constructor=dict) del result["DescribeClustersResponse"]["ResponseMetadata"] result.should.have.key("DescribeClustersResponse") result["DescribeClustersResponse"].should.have.key("DescribeClustersResult") result["DescribeClustersResponse"]["DescribeClustersResult"].should.have.key( "Clusters" ) result = result["DescribeClustersResponse"]["DescribeClustersResult"]["Clusters"] if not is_json: > result = result["item"] E TypeError: 'NoneType' object is not subscriptable tests/test_redshift/test_server.py:195: TypeError __________________________________________________________ test_create_and_describe_cluster_security_group[JSON] ___________________________________________________________ self = , args = (['Default Redshift Security Group'],), kw = {} @wraps(func) def wrapper(self, *args, **kw): try: > value = func(self, *args, **kw) /usr/lib/python3.8/site-packages/sure/__init__.py:408: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , first = ['Default Redshift Security Group'], rest = () collection_should = @assertionmethod def within(self, first, *rest): if isinstance(first, Iterable): collection_should = AssertionHelper(first) if self.negative: return collection_should.does_not_contain(self.obj) else: > return collection_should.contains(self.obj) /usr/lib/python3.8/site-packages/sure/__init__.py:680: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , what = 'desc for csg1' def contains(self, what): > assert what in self._src, '%r should be in %r' % (what, self._src) E AssertionError: 'desc for csg1' should be in ['Default Redshift Security Group'] /usr/lib/python3.8/site-packages/sure/old.py:434: AssertionError During handling of the above exception, another exception occurred: self = , args = ('desc for csg1',), kw = {} @wraps(func) def wrapper(self, *args, **kw): try: > value = func(self, *args, **kw) /usr/lib/python3.8/site-packages/sure/__init__.py:408: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , what = 'desc for csg1' @assertionmethod def contain(self, what): obj = self.obj if self.negative: return expect(what).to.not_be.within(obj) else: > return expect(what).to.be.within(obj) /usr/lib/python3.8/site-packages/sure/__init__.py:948: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = (['Default Redshift Security Group'],), kw = {} @wraps(func) def wrapper(self, *args, **kw): try: value = func(self, *args, **kw) except AssertionError as e: > raise AssertionError(e) E AssertionError: 'desc for csg1' should be in ['Default Redshift Security Group'] /usr/lib/python3.8/site-packages/sure/__init__.py:410: AssertionError During handling of the above exception, another exception occurred: is_json = True @pytest.mark.parametrize("is_json", [True, False], ids=["JSON", "XML"]) @mock_redshift def test_create_and_describe_cluster_security_group(is_json): backend = server.create_backend_app("redshift") test_client = backend.test_client() security_group_names = ["csg1", "csg2"] for csg in security_group_names: create_params = ( "?Action=CreateClusterSecurityGroup" "&ClusterSecurityGroupName=" + csg + "&Description=desc for " + csg + "" ) if is_json: create_params += "&ContentType=JSON" test_client.post(create_params) describe_params = "/?Action=DescribeClusterSecurityGroups" if is_json: describe_params += "&ContentType=JSON" res = test_client.get(describe_params) result = res.data.decode("utf-8") if is_json: result = json.loads(result) else: result = xmltodict.parse(result, dict_constructor=dict) groups = result["DescribeClusterSecurityGroupsResponse"][ "DescribeClusterSecurityGroupsResult" ]["ClusterSecurityGroups"] if not is_json: groups = groups["item"] descriptions = [g["Description"] for g in groups] > descriptions.should.contain("desc for csg1") tests/test_redshift/test_server.py:236: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = ('desc for csg1',), kw = {} @wraps(func) def wrapper(self, *args, **kw): try: value = func(self, *args, **kw) except AssertionError as e: > raise AssertionError(e) E AssertionError: 'desc for csg1' should be in ['Default Redshift Security Group'] /usr/lib/python3.8/site-packages/sure/__init__.py:410: AssertionError ___________________________________________________________ test_create_and_describe_cluster_security_group[XML] ___________________________________________________________ is_json = False @pytest.mark.parametrize("is_json", [True, False], ids=["JSON", "XML"]) @mock_redshift def test_create_and_describe_cluster_security_group(is_json): backend = server.create_backend_app("redshift") test_client = backend.test_client() security_group_names = ["csg1", "csg2"] for csg in security_group_names: create_params = ( "?Action=CreateClusterSecurityGroup" "&ClusterSecurityGroupName=" + csg + "&Description=desc for " + csg + "" ) if is_json: create_params += "&ContentType=JSON" test_client.post(create_params) describe_params = "/?Action=DescribeClusterSecurityGroups" if is_json: describe_params += "&ContentType=JSON" res = test_client.get(describe_params) result = res.data.decode("utf-8") if is_json: result = json.loads(result) else: result = xmltodict.parse(result, dict_constructor=dict) groups = result["DescribeClusterSecurityGroupsResponse"][ "DescribeClusterSecurityGroupsResult" ]["ClusterSecurityGroups"] if not is_json: groups = groups["item"] > descriptions = [g["Description"] for g in groups] tests/test_redshift/test_server.py:235: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .0 = > descriptions = [g["Description"] for g in groups] E TypeError: string indices must be integers tests/test_redshift/test_server.py:235: TypeError ______________________________________________________________ test_create_cluster_with_security_group[JSON] _______________________________________________________________ is_json = True @pytest.mark.parametrize("is_json", [True, False], ids=["JSON", "XML"]) @mock_redshift def test_create_cluster_with_security_group(is_json): backend = server.create_backend_app("redshift") test_client = backend.test_client() security_group_names = ["csg1", "csg2"] for csg in security_group_names: create_params = ( "?Action=CreateClusterSecurityGroup" "&ClusterSecurityGroupName=" + csg + "&Description=desc for " + csg + "" ) if is_json: create_params += "&ContentType=JSON" res = test_client.post(create_params) response = res.data.decode("utf-8") if is_json: > response = json.loads(response) tests/test_redshift/test_server.py:310: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.8/json/__init__.py:357: in loads return _default_decoder.decode(s) /usr/lib64/python3.8/json/decoder.py:337: in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = s = '\n\n404 Not Found\n

Not Found

\n

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

\n' idx = 0 def raw_decode(self, s, idx=0): """Decode a JSON document from ``s`` (a ``str`` beginning with a JSON document) and return a 2-tuple of the Python representation and the index in ``s`` where the document ended. This can be used to decode a JSON document from a string that may have extraneous data at the end. """ try: obj, end = self.scan_once(s, idx) except StopIteration as err: > raise JSONDecodeError("Expecting value", s, err.value) from None E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) /usr/lib64/python3.8/json/decoder.py:355: JSONDecodeError _______________________________________________________________ test_create_cluster_with_security_group[XML] _______________________________________________________________ is_json = False @pytest.mark.parametrize("is_json", [True, False], ids=["JSON", "XML"]) @mock_redshift def test_create_cluster_with_security_group(is_json): backend = server.create_backend_app("redshift") test_client = backend.test_client() security_group_names = ["csg1", "csg2"] for csg in security_group_names: create_params = ( "?Action=CreateClusterSecurityGroup" "&ClusterSecurityGroupName=" + csg + "&Description=desc for " + csg + "" ) if is_json: create_params += "&ContentType=JSON" res = test_client.post(create_params) response = res.data.decode("utf-8") if is_json: response = json.loads(response) else: > response = xmltodict.parse(response, dict_constructor=dict) tests/test_redshift/test_server.py:312: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ xml_input = b'\n\n404 Not Found\n

Not Found

\n

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

\n' encoding = 'utf-8', expat = , process_namespaces = False, namespace_separator = None disable_entities = True, kwargs = {'dict_constructor': }, handler = parser = , feature = 'http://apache.org/xml/features/disallow-doctype-decl' def parse(xml_input, encoding=None, expat=expat, process_namespaces=False, namespace_separator=':', disable_entities=True, **kwargs): """Parse the given XML input and convert it into a dictionary. `xml_input` can either be a `string` or a file-like object. If `xml_attribs` is `True`, element attributes are put in the dictionary among regular child elements, using `@` as a prefix to avoid collisions. If set to `False`, they are just ignored. Simple example:: >>> import xmltodict >>> doc = xmltodict.parse(\"\"\" ... ... 1 ... 2 ... ... \"\"\") >>> doc['a']['@prop'] u'x' >>> doc['a']['b'] [u'1', u'2'] If `item_depth` is `0`, the function returns a dictionary for the root element (default behavior). Otherwise, it calls `item_callback` every time an item at the specified depth is found and returns `None` in the end (streaming mode). The callback function receives two parameters: the `path` from the document root to the item (name-attribs pairs), and the `item` (dict). If the callback's return value is false-ish, parsing will be stopped with the :class:`ParsingInterrupted` exception. Streaming example:: >>> def handle(path, item): ... print('path:%s item:%s' % (path, item)) ... return True ... >>> xmltodict.parse(\"\"\" ... ... 1 ... 2 ... \"\"\", item_depth=2, item_callback=handle) path:[(u'a', {u'prop': u'x'}), (u'b', None)] item:1 path:[(u'a', {u'prop': u'x'}), (u'b', None)] item:2 The optional argument `postprocessor` is a function that takes `path`, `key` and `value` as positional arguments and returns a new `(key, value)` pair where both `key` and `value` may have changed. Usage example:: >>> def postprocessor(path, key, value): ... try: ... return key + ':int', int(value) ... except (ValueError, TypeError): ... return key, value >>> xmltodict.parse('12x', ... postprocessor=postprocessor) OrderedDict([(u'a', OrderedDict([(u'b:int', [1, 2]), (u'b', u'x')]))]) You can pass an alternate version of `expat` (such as `defusedexpat`) by using the `expat` parameter. E.g: >>> import defusedexpat >>> xmltodict.parse('hello', expat=defusedexpat.pyexpat) OrderedDict([(u'a', u'hello')]) You can use the force_list argument to force lists to be created even when there is only a single child of a given level of hierarchy. The force_list argument is a tuple of keys. If the key for a given level of hierarchy is in the force_list argument, that level of hierarchy will have a list as a child (even if there is only one sub-element). The index_keys operation takes precendence over this. This is applied after any user-supplied postprocessor has already run. For example, given this input: host1 Linux em0 10.0.0.1 If called with force_list=('interface',), it will produce this dictionary: {'servers': {'server': {'name': 'host1', 'os': 'Linux'}, 'interfaces': {'interface': [ {'name': 'em0', 'ip_address': '10.0.0.1' } ] } } } `force_list` can also be a callable that receives `path`, `key` and `value`. This is helpful in cases where the logic that decides whether a list should be forced is more complex. """ handler = _DictSAXHandler(namespace_separator=namespace_separator, **kwargs) if isinstance(xml_input, _unicode): if not encoding: encoding = 'utf-8' xml_input = xml_input.encode(encoding) if not process_namespaces: namespace_separator = None parser = expat.ParserCreate( encoding, namespace_separator ) try: parser.ordered_attributes = True except AttributeError: # Jython's expat does not support ordered_attributes pass parser.StartNamespaceDeclHandler = handler.startNamespaceDecl parser.StartElementHandler = handler.startElement parser.EndElementHandler = handler.endElement parser.CharacterDataHandler = handler.characters parser.buffer_text = True if disable_entities: try: # Attempt to disable DTD in Jython's expat parser (Xerces-J). feature = "http://apache.org/xml/features/disallow-doctype-decl" parser._reader.setFeature(feature, True) except AttributeError: # For CPython / expat parser. # Anything not handled ends up here and entities aren't expanded. parser.DefaultHandler = lambda x: None # Expects an integer return; zero means failure -> expat.ExpatError. parser.ExternalEntityRefHandler = lambda *x: 1 if hasattr(xml_input, 'read'): parser.ParseFile(xml_input) else: > parser.Parse(xml_input, True) E xml.parsers.expat.ExpatError: syntax error: line 1, column 0 /usr/lib/python3.8/site-packages/xmltodict.py:327: ExpatError ________________________________________________________________ test_threaded_moto_server__using_requests _________________________________________________________________ self = args = (b'\n\n404 Not Found\n

Not Found

\n

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

\n',) kw = {} @wraps(func) def wrapper(self, *args, **kw): try: > value = func(self, *args, **kw) /usr/lib/python3.8/site-packages/sure/__init__.py:408: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = first = b'\n\n404 Not Found\n

Not Found

\n

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

\n' rest = (), collection_should = @assertionmethod def within(self, first, *rest): if isinstance(first, Iterable): collection_should = AssertionHelper(first) if self.negative: return collection_should.does_not_contain(self.obj) else: > return collection_should.contains(self.obj) /usr/lib/python3.8/site-packages/sure/__init__.py:680: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , what = b'Moto' def contains(self, what): > assert what in self._src, '%r should be in %r' % (what, self._src) E AssertionError: b'Moto' should be in b'\n\n404 Not Found\n

Not Found

\n

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

\n' /usr/lib/python3.8/site-packages/sure/old.py:434: AssertionError During handling of the above exception, another exception occurred: self = , args = (b'Moto',), kw = {} @wraps(func) def wrapper(self, *args, **kw): try: > value = func(self, *args, **kw) /usr/lib/python3.8/site-packages/sure/__init__.py:408: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , what = b'Moto' @assertionmethod def contain(self, what): obj = self.obj if self.negative: return expect(what).to.not_be.within(obj) else: > return expect(what).to.be.within(obj) /usr/lib/python3.8/site-packages/sure/__init__.py:948: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = (b'\n\n404 Not Found\n

Not Found

\n

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

\n',) kw = {} @wraps(func) def wrapper(self, *args, **kw): try: value = func(self, *args, **kw) except AssertionError as e: > raise AssertionError(e) E AssertionError: b'Moto' should be in b'\n\n404 Not Found\n

Not Found

\n

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

\n' /usr/lib/python3.8/site-packages/sure/__init__.py:410: AssertionError During handling of the above exception, another exception occurred: def test_threaded_moto_server__using_requests(): if settings.TEST_SERVER_MODE: raise SkipTest("No point in testing ServerMode within ServerMode") server = ThreadedMotoServer(port=5001) server.start() requests.post("http://localhost:5001/moto-api/reset") try: r = requests.get("http://localhost:5001/moto-api") > r.content.should.contain(b"Moto") tests/test_utilities/test_threaded_server.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , args = (b'Moto',), kw = {} @wraps(func) def wrapper(self, *args, **kw): try: value = func(self, *args, **kw) except AssertionError as e: > raise AssertionError(e) E AssertionError: b'Moto' should be in b'\n\n404 Not Found\n

Not Found

\n

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

\n' /usr/lib/python3.8/site-packages/sure/__init__.py:410: AssertionError --------------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------------- The ThreadedMotoServer is considered in beta for now, and the exact interface and behaviour may still change. Please let us know if you’d like to see any changes. ======== Starting a new Thread with MotoServer running on 0.0.0.0:5001... ---------------------------------------------------------------------------- Captured log call ----------------------------------------------------------------------------- INFO werkzeug:_internal.py:224 127.0.0.1 - - [01/Aug/2022 15:02:32] "POST /moto-api/reset HTTP/1.1" 200 - INFO werkzeug:_internal.py:224 127.0.0.1 - - [01/Aug/2022 15:02:32] "GET /moto-api HTTP/1.1" 404 - ============================================================================= warnings summary ============================================================================= moto/__init__.py:26 tests/test_core/test_url_base_regex.py::TestMockBucketStartingWithServiceName::test_bucketname_starting_with_service_name[dynamodb2-] /home/tkloczko/rpmbuild/BUILD/moto-3.1.10/moto/__init__.py:26: UserWarning: Module mock_dynamodb2 has been deprecated, and will be removed in a later release. Please use mock_dynamodb instead. See https://github.com/spulec/moto/issues/4526 for more information. warnings.warn( moto/__init__.py:26 tests/test_core/test_url_base_regex.py::TestMockBucketStartingWithServiceName::test_bucketname_starting_with_service_name[rds2-] /home/tkloczko/rpmbuild/BUILD/moto-3.1.10/moto/__init__.py:26: UserWarning: Module mock_rds2 has been deprecated, and will be removed in a later release. Please use mock_rds instead. See https://github.com/spulec/moto/issues/4526 for more information. warnings.warn( tests/test_autoscaling/test_autoscaling.py::test_attach_instances tests/test_ec2/test_spot_instances.py::test_launch_spot_instance_instance_lifecycle tests/test_ec2/test_spot_instances.py::test_launch_instance_instance_lifecycle /home/tkloczko/rpmbuild/BUILD/moto-3.1.10/moto/ec2/models/instances.py:124: PendingDeprecationWarning: Could not find AMI with image-id:ami-pytest, in the near future this will cause an error. Use ec2_backend.describe_images() to find suitable image for your test warnings.warn( tests/test_dynamodb2/test_dynamodb.py::test_deprecation_warning tests/test_rds2/test_rds2.py::test_deprecation_warning /usr/lib/python3.8/site-packages/_pytest/python.py:198: PytestRemovedIn8Warning: Passing None has been deprecated. See https://docs.pytest.org/en/latest/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests for alternatives in common use cases. result = testfunction(**testargs) tests/test_ec2/test_instances.py::test_create_instance_with_launch_template_id_produces_no_warning[LaunchTemplateId] tests/test_ec2/test_instances.py::test_create_instance_with_launch_template_id_produces_no_warning[LaunchTemplateName] /home/tkloczko/rpmbuild/BUILD/moto-3.1.10/moto/core/models.py:122: PytestRemovedIn8Warning: Passing None has been deprecated. See https://docs.pytest.org/en/latest/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests for alternatives in common use cases. result = func(*args, **kwargs) tests/test_ec2/test_instances.py::test_describe_instances_filter_vpcid_via_networkinterface /home/tkloczko/rpmbuild/BUILD/moto-3.1.10/moto/ec2/models/instances.py:124: PendingDeprecationWarning: Could not find AMI with image-id:myami, in the near future this will cause an error. Use ec2_backend.describe_images() to find suitable image for your test warnings.warn( tests/test_ec2/test_spot_fleet.py::test_request_spot_fleet_using_launch_template_config__name[diversified] tests/test_ec2/test_spot_fleet.py::test_request_spot_fleet_using_launch_template_config__name[lowestCost] tests/test_ec2/test_spot_fleet.py::test_request_spot_fleet_using_launch_template_config__id tests/test_ec2/test_spot_fleet.py::test_request_spot_fleet_using_launch_template_config__overrides /home/tkloczko/rpmbuild/BUILD/moto-3.1.10/moto/ec2/models/instances.py:124: PendingDeprecationWarning: Could not find AMI with image-id:ami-04d4e25790238c5f4, in the near future this will cause an error. Use ec2_backend.describe_images() to find suitable image for your test warnings.warn( tests/test_ec2/test_spot_instances.py::test_request_spot_instances_instance_lifecycle tests/test_ec2/test_spot_instances.py::test_request_spot_instances_with_tags /home/tkloczko/rpmbuild/BUILD/moto-3.1.10/moto/ec2/models/instances.py:124: PendingDeprecationWarning: Could not find AMI with image-id:None, in the near future this will cause an error. Use ec2_backend.describe_images() to find suitable image for your test warnings.warn( tests/test_emr/test_emr_boto3.py::test_describe_cluster tests/test_emr/test_emr_boto3.py::test_describe_job_flow /home/tkloczko/rpmbuild/BUILD/moto-3.1.10/moto/emr/models.py:617: PendingDeprecationWarning: Could not find Subnet with id: subnet-8be41cec In the near future, this will raise an error. Use ec2.describe_subnets() to find a suitable id for your test. warnings.warn( tests/test_events/test_events_integration.py::test_send_to_sqs_fifo_queue /home/tkloczko/rpmbuild/BUILD/moto-3.1.10/moto/events/models.py:216: UserWarning: To let EventBridge send messages to your SQS FIFO queue, you must enable content-based deduplication. warnings.warn( tests/test_glue/test_partition_filter.py::test_get_partitions_expression_unknown_column tests/test_glue/test_partition_filter.py::test_get_partitions_expression_int_column tests/test_glue/test_partition_filter.py::test_get_partitions_expression_decimal_column tests/test_glue/test_partition_filter.py::test_get_partitions_expression_string_column tests/test_glue/test_partition_filter.py::test_get_partitions_expression_date_column tests/test_glue/test_partition_filter.py::test_get_partitions_expression_timestamp_column tests/test_glue/test_partition_filter.py::test_get_partition_expression_warnings_and_exceptions /home/tkloczko/rpmbuild/BUILD/moto-3.1.10/moto/glue/utils.py:350: UserWarning: Expression filtering is experimental warnings.warn("Expression filtering is experimental") -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ========================================================================= short test summary info ========================================================================== SKIPPED [2] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:364: Only run test with external server SKIPPED [3] ../../../../../usr/lib/python3.8/site-packages/_pytest/unittest.py:364: We only want to test ServerMode here FAILED tests/test_ec2/test_customer_gateways.py::test_create_customer_gateways_boto3 - AssertionError: given FAILED tests/test_redshift/test_server.py::test_create_cluster[JSON] - json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) FAILED tests/test_redshift/test_server.py::test_create_cluster[XML] - xml.parsers.expat.ExpatError: syntax error: line 1, column 0 FAILED tests/test_redshift/test_server.py::test_create_cluster_multiple_params[JSON] - json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) FAILED tests/test_redshift/test_server.py::test_create_cluster_multiple_params[XML] - xml.parsers.expat.ExpatError: syntax error: line 1, column 0 FAILED tests/test_redshift/test_server.py::test_create_and_describe_clusters[JSON] - AssertionError: the length of [] should be 2, but is 0 FAILED tests/test_redshift/test_server.py::test_create_and_describe_clusters[XML] - TypeError: 'NoneType' object is not subscriptable FAILED tests/test_redshift/test_server.py::test_create_and_describe_cluster_security_group[JSON] - AssertionError: 'desc for csg1' should be in ['Default Redshift Securi... FAILED tests/test_redshift/test_server.py::test_create_and_describe_cluster_security_group[XML] - TypeError: string indices must be integers FAILED tests/test_redshift/test_server.py::test_create_cluster_with_security_group[JSON] - json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) FAILED tests/test_redshift/test_server.py::test_create_cluster_with_security_group[XML] - xml.parsers.expat.ExpatError: syntax error: line 1, column 0 FAILED tests/test_utilities/test_threaded_server.py::test_threaded_moto_server__using_requests - AssertionError: b'Moto' should be in b'\n<... =========================================== 12 failed, 5874 passed, 5 skipped, 86 deselected, 28 warnings in 1156.01s (0:19:16) ============================================ ```
kloczek commented 2 years ago

I'm going to add above failing units to --deselect list as well. FYI: here is list of modules isntalled in build env:

Package                       Version
----------------------------- -----------------
alabaster                     0.7.12
attrs                         22.1.0
Babel                         2.10.2
boto3                         1.24.39
botocore                      1.27.39
build                         0.8.0
cffi                          1.15.1
charset-normalizer            2.1.0
click                         8.1.2
cryptography                  36.0.2
distro                        1.7.0
docutils                      0.18.1
ecdsa                         0.18.0
extended-project              1.2.3
extras                        1.0.0
fixtures                      4.0.0
Flask                         2.1.3
Flask-Cors                    3.0.10
freezegun                     1.2.1
gpg                           1.17.1-unknown
graphql-core                  3.2.1
idna                          3.3
imagesize                     1.4.1
importlib-metadata            4.12.0
importlib-resources           5.9.0
iniconfig                     1.1.1
itsdangerous                  2.1.2
Jinja2                        3.1.1
jmespath                      1.0.0
jsondiff                      2.0.0
jsonschema                    4.8.0
libcomps                      0.1.18
MarkupSafe                    2.1.1
mock                          4.0.3
openapi-schema-validator      0.3.0
openapi-spec-validator        0.4.0
packaging                     21.3
pbr                           5.9.0
pep517                        0.12.0
pip                           22.0.4
pluggy                        1.0.0
ply                           3.11
py                            1.11.0
pyasn1                        0.4.8
pycparser                     2.21
Pygments                      2.12.0
pyparsing                     3.0.9
pyrsistent                    0.18.1
pytest                        7.1.2
python-dateutil               2.8.2
python-jose                   3.3.0
pytz                          2022.1
PyYAML                        6.0
requests                      2.28.1
responses                     0.21.0
rpm                           4.17.0
rsa                           4.8
s3transfer                    0.6.0
setuptools                    63.3.0
simple-project                1.2.3
six                           1.16.0
snowballstemmer               2.2.0
Sphinx                        5.1.1
sphinxcontrib-applehelp       1.0.2.dev20220730
sphinxcontrib-devhelp         1.0.2.dev20220730
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-jsmath          1.0.1.dev20220730
sphinxcontrib-qthelp          1.0.3.dev20220730
sphinxcontrib-serializinghtml 1.1.5
sshpubkeys                    3.3.1
sure                          2.0.0
testtools                     2.5.0
tomli                         2.0.1
urllib3                       1.26.9
Werkzeug                      2.2.1
wheel                         0.37.1
xmltodict                     0.12.0
zipp                          3.8.1
kloczek commented 2 years ago

Hi @kloczek, which version of werkzeug are pulling in? There is a known bug with version>=2.2.0, so you may have better luck installing an older version (2.1.x).

Hmm .. as you see I;m using 2.2.1. Do you have URL of the ticket iwth that issue? 🤔

bblommers commented 2 years ago

5329 and #5341

No progress on either, because I haven't had time - master currently just pins werkzeug to an pre-2.2.0 version

kloczek commented 2 years ago

OK so there is no yet werkzeug ticket? 🤔

kloczek commented 2 years ago

If it is already known issue feel free close that ticket as duplicate.

kloczek commented 2 years ago

So what about those failing units and pytest warnings? Needs to be added to ToDo list? 😋

bblommers commented 2 years ago

I'm going to close this in favor of #5341 - the comment there explains the failing unit tests.

The pytest warnings will be solved at some points, but that is not very high prio.