From e993917d4c4706d8fa896f5e2b32e8fb3cd297b4 Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Tue, 5 Mar 2013 08:35:18 -0500 Subject: [PATCH] pep8 --- moto/dynamodb/models.py | 4 ++-- moto/ec2/responses/amazon_dev_pay.py | 1 - .../responses/availability_zones_and_regions.py | 1 - moto/ec2/responses/customer_gateways.py | 1 - moto/ec2/responses/dhcp_options.py | 1 - moto/ec2/responses/elastic_ip_addresses.py | 1 - moto/ec2/responses/elastic_network_interfaces.py | 1 - moto/ec2/responses/general.py | 1 - moto/ec2/responses/internet_gateways.py | 1 - moto/ec2/responses/ip_addresses.py | 1 - moto/ec2/responses/key_pairs.py | 1 - moto/ec2/responses/monitoring.py | 1 - moto/ec2/responses/network_acls.py | 1 - moto/ec2/responses/placement_groups.py | 1 - moto/ec2/responses/reserved_instances.py | 1 - moto/ec2/responses/route_tables.py | 1 - moto/ec2/responses/spot_instances.py | 1 - moto/ec2/responses/subnets.py | 1 - moto/ec2/responses/virtual_private_gateways.py | 1 - moto/ec2/responses/vm_export.py | 1 - moto/ec2/responses/vm_import.py | 1 - moto/ec2/responses/vpcs.py | 1 - moto/ec2/responses/vpn_connections.py | 1 - moto/ec2/responses/windows.py | 1 - moto/ses/utils.py | 14 +++++++------- moto/sqs/models.py | 6 ++++-- tests/test_core/test_decorator_calls.py | 4 ++-- tests/test_dynamodb/test_dynamodb.py | 3 ++- tests/test_ec2/test_amazon_dev_pay.py | 2 +- tests/test_ec2/test_amis.py | 4 ++-- .../test_availability_zones_and_regions.py | 2 +- tests/test_ec2/test_customer_gateways.py | 2 +- tests/test_ec2/test_dhcp_options.py | 2 +- tests/test_ec2/test_ec2_core.py | 6 ++++-- tests/test_ec2/test_elastic_ip_addresses.py | 2 +- tests/test_ec2/test_elastic_network_interfaces.py | 2 +- tests/test_ec2/test_general.py | 2 +- tests/test_ec2/test_internet_gateways.py | 2 +- tests/test_ec2/test_ip_addresses.py | 2 +- tests/test_ec2/test_key_pairs.py | 2 +- tests/test_ec2/test_monitoring.py | 2 +- tests/test_ec2/test_network_acls.py | 2 +- tests/test_ec2/test_placement_groups.py | 2 +- tests/test_ec2/test_reserved_instances.py | 2 +- tests/test_ec2/test_route_tables.py | 2 +- tests/test_ec2/test_security_groups.py | 4 ++-- tests/test_ec2/test_spot_instances.py | 2 +- tests/test_ec2/test_subnets.py | 2 +- tests/test_ec2/test_virtual_private_gateways.py | 2 +- tests/test_ec2/test_vm_export.py | 2 +- tests/test_ec2/test_vm_import.py | 2 +- tests/test_ec2/test_vpcs.py | 2 +- tests/test_ec2/test_vpn_connections.py | 2 +- tests/test_ec2/test_windows.py | 2 +- tests/test_s3/test_s3.py | 4 ++-- tests/test_ses/test_ses.py | 2 +- tests/test_sqs/test_sqs.py | 4 ++-- 57 files changed, 53 insertions(+), 71 deletions(-) diff --git a/moto/dynamodb/models.py b/moto/dynamodb/models.py index fdb5040fd..1c0f1521c 100644 --- a/moto/dynamodb/models.py +++ b/moto/dynamodb/models.py @@ -7,8 +7,8 @@ from .utils import unix_time class Table(object): def __init__(self, name, hash_key_attr=None, hash_key_type=None, - range_key_attr=None, range_key_type=None, read_capacity=None, - write_capacity=None): + range_key_attr=None, range_key_type=None, read_capacity=None, + write_capacity=None): self.name = name self.hash_key_attr = hash_key_attr self.hash_key_type = hash_key_type diff --git a/moto/ec2/responses/amazon_dev_pay.py b/moto/ec2/responses/amazon_dev_pay.py index c1c212716..b5a0cf646 100644 --- a/moto/ec2/responses/amazon_dev_pay.py +++ b/moto/ec2/responses/amazon_dev_pay.py @@ -7,4 +7,3 @@ from moto.ec2.utils import resource_ids_from_querystring class AmazonDevPay(object): def confirm_product_instance(self): raise NotImplementedError('AmazonDevPay.confirm_product_instance is not yet implemented') - diff --git a/moto/ec2/responses/availability_zones_and_regions.py b/moto/ec2/responses/availability_zones_and_regions.py index 229637025..4faeda764 100644 --- a/moto/ec2/responses/availability_zones_and_regions.py +++ b/moto/ec2/responses/availability_zones_and_regions.py @@ -1,7 +1,6 @@ from jinja2 import Template from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring class AvailabilityZonesAndRegions(object): diff --git a/moto/ec2/responses/customer_gateways.py b/moto/ec2/responses/customer_gateways.py index ddcb969a6..06c590e4e 100644 --- a/moto/ec2/responses/customer_gateways.py +++ b/moto/ec2/responses/customer_gateways.py @@ -13,4 +13,3 @@ class CustomerGateways(object): def describe_customer_gateways(self): raise NotImplementedError('CustomerGateways(AmazonVPC).describe_customer_gateways is not yet implemented') - diff --git a/moto/ec2/responses/dhcp_options.py b/moto/ec2/responses/dhcp_options.py index abb0fbdbc..23e73b317 100644 --- a/moto/ec2/responses/dhcp_options.py +++ b/moto/ec2/responses/dhcp_options.py @@ -16,4 +16,3 @@ class DHCPOptions(object): def describe_dhcp_options(self): raise NotImplementedError('DHCPOptions(AmazonVPC).describe_dhcp_options is not yet implemented') - diff --git a/moto/ec2/responses/elastic_ip_addresses.py b/moto/ec2/responses/elastic_ip_addresses.py index 2a5d67ab2..368517d7d 100644 --- a/moto/ec2/responses/elastic_ip_addresses.py +++ b/moto/ec2/responses/elastic_ip_addresses.py @@ -19,4 +19,3 @@ class ElasticIPAddresses(object): def release_address(self): raise NotImplementedError('ElasticIPAddresses.release_address is not yet implemented') - diff --git a/moto/ec2/responses/elastic_network_interfaces.py b/moto/ec2/responses/elastic_network_interfaces.py index e7f3c1115..f3624070d 100644 --- a/moto/ec2/responses/elastic_network_interfaces.py +++ b/moto/ec2/responses/elastic_network_interfaces.py @@ -28,4 +28,3 @@ class ElasticNetworkInterfaces(object): def reset_network_interface_attribute(self): raise NotImplementedError('ElasticNetworkInterfaces(AmazonVPC).reset_network_interface_attribute is not yet implemented') - diff --git a/moto/ec2/responses/general.py b/moto/ec2/responses/general.py index 2e355129d..8c4eba053 100644 --- a/moto/ec2/responses/general.py +++ b/moto/ec2/responses/general.py @@ -7,4 +7,3 @@ from moto.ec2.utils import resource_ids_from_querystring class General(object): def get_console_output(self): raise NotImplementedError('General.get_console_output is not yet implemented') - diff --git a/moto/ec2/responses/internet_gateways.py b/moto/ec2/responses/internet_gateways.py index c828bb980..772623bc6 100644 --- a/moto/ec2/responses/internet_gateways.py +++ b/moto/ec2/responses/internet_gateways.py @@ -19,4 +19,3 @@ class InternetGateways(object): def detach_internet_gateway(self): raise NotImplementedError('InternetGateways(AmazonVPC).detach_internet_gateway is not yet implemented') - diff --git a/moto/ec2/responses/ip_addresses.py b/moto/ec2/responses/ip_addresses.py index 53b35362e..b88a5462e 100644 --- a/moto/ec2/responses/ip_addresses.py +++ b/moto/ec2/responses/ip_addresses.py @@ -10,4 +10,3 @@ class IPAddresses(object): def unassign_private_ip_addresses(self): raise NotImplementedError('IPAddresses.unassign_private_ip_addresses is not yet implemented') - diff --git a/moto/ec2/responses/key_pairs.py b/moto/ec2/responses/key_pairs.py index abfaf85c1..23e438bfc 100644 --- a/moto/ec2/responses/key_pairs.py +++ b/moto/ec2/responses/key_pairs.py @@ -16,4 +16,3 @@ class KeyPairs(object): def import_key_pair(self): raise NotImplementedError('KeyPairs.import_key_pair is not yet implemented') - diff --git a/moto/ec2/responses/monitoring.py b/moto/ec2/responses/monitoring.py index c22760640..e3fc1611a 100644 --- a/moto/ec2/responses/monitoring.py +++ b/moto/ec2/responses/monitoring.py @@ -10,4 +10,3 @@ class Monitoring(object): def unmonitor_instances(self): raise NotImplementedError('Monitoring.unmonitor_instances is not yet implemented') - diff --git a/moto/ec2/responses/network_acls.py b/moto/ec2/responses/network_acls.py index 191b8d08e..abcf1ab6e 100644 --- a/moto/ec2/responses/network_acls.py +++ b/moto/ec2/responses/network_acls.py @@ -25,4 +25,3 @@ class NetworkACLs(object): def replace_network_acl_entry(self): raise NotImplementedError('NetworkACLs(AmazonVPC).replace_network_acl_entry is not yet implemented') - diff --git a/moto/ec2/responses/placement_groups.py b/moto/ec2/responses/placement_groups.py index 1181f51d2..7f7b881df 100644 --- a/moto/ec2/responses/placement_groups.py +++ b/moto/ec2/responses/placement_groups.py @@ -13,4 +13,3 @@ class PlacementGroups(object): def describe_placement_groups(self): raise NotImplementedError('PlacementGroups.describe_placement_groups is not yet implemented') - diff --git a/moto/ec2/responses/reserved_instances.py b/moto/ec2/responses/reserved_instances.py index 910720417..faf413426 100644 --- a/moto/ec2/responses/reserved_instances.py +++ b/moto/ec2/responses/reserved_instances.py @@ -22,4 +22,3 @@ class ReservedInstances(object): def purchase_reserved_instances_offering(self): raise NotImplementedError('ReservedInstances.purchase_reserved_instances_offering is not yet implemented') - diff --git a/moto/ec2/responses/route_tables.py b/moto/ec2/responses/route_tables.py index a838ed52b..6266742ed 100644 --- a/moto/ec2/responses/route_tables.py +++ b/moto/ec2/responses/route_tables.py @@ -31,4 +31,3 @@ class RouteTables(object): def replace_route_table_association(self): raise NotImplementedError('RouteTables(AmazonVPC).replace_route_table_association is not yet implemented') - diff --git a/moto/ec2/responses/spot_instances.py b/moto/ec2/responses/spot_instances.py index 4cf9845bf..0ace72dfd 100644 --- a/moto/ec2/responses/spot_instances.py +++ b/moto/ec2/responses/spot_instances.py @@ -25,4 +25,3 @@ class SpotInstances(object): def request_spot_instances(self): raise NotImplementedError('SpotInstances.request_spot_instances is not yet implemented') - diff --git a/moto/ec2/responses/subnets.py b/moto/ec2/responses/subnets.py index 8511a2dc9..6cbe9c7f8 100644 --- a/moto/ec2/responses/subnets.py +++ b/moto/ec2/responses/subnets.py @@ -13,4 +13,3 @@ class Subnets(object): def describe_subnets(self): raise NotImplementedError('Subnets(AmazonVPC).describe_subnets is not yet implemented') - diff --git a/moto/ec2/responses/virtual_private_gateways.py b/moto/ec2/responses/virtual_private_gateways.py index 1b870ede3..7f4c8292d 100644 --- a/moto/ec2/responses/virtual_private_gateways.py +++ b/moto/ec2/responses/virtual_private_gateways.py @@ -19,4 +19,3 @@ class VirtualPrivateGateways(object): def detach_vpn_gateway(self): raise NotImplementedError('VirtualPrivateGateways(AmazonVPC).detach_vpn_gateway is not yet implemented') - diff --git a/moto/ec2/responses/vm_export.py b/moto/ec2/responses/vm_export.py index a89541f06..466c627a6 100644 --- a/moto/ec2/responses/vm_export.py +++ b/moto/ec2/responses/vm_export.py @@ -13,4 +13,3 @@ class VMExport(object): def describe_export_tasks(self): raise NotImplementedError('VMExport.describe_export_tasks is not yet implemented') - diff --git a/moto/ec2/responses/vm_import.py b/moto/ec2/responses/vm_import.py index 061b91abd..7bed7c8da 100644 --- a/moto/ec2/responses/vm_import.py +++ b/moto/ec2/responses/vm_import.py @@ -16,4 +16,3 @@ class VMImport(object): def import_volume(self): raise NotImplementedError('VMImport.import_volume is not yet implemented') - diff --git a/moto/ec2/responses/vpcs.py b/moto/ec2/responses/vpcs.py index 908b3a64e..c2c954f11 100644 --- a/moto/ec2/responses/vpcs.py +++ b/moto/ec2/responses/vpcs.py @@ -13,4 +13,3 @@ class VPCs(object): def describe_vpcs(self): raise NotImplementedError('VPCs(AmazonVPC).describe_vpcs is not yet implemented') - diff --git a/moto/ec2/responses/vpn_connections.py b/moto/ec2/responses/vpn_connections.py index ae399cf22..1a4dbb75a 100644 --- a/moto/ec2/responses/vpn_connections.py +++ b/moto/ec2/responses/vpn_connections.py @@ -13,4 +13,3 @@ class VPNConnections(object): def describe_vpn_connections(self): raise NotImplementedError('VPNConnections(AmazonVPC).describe_vpn_connections is not yet implemented') - diff --git a/moto/ec2/responses/windows.py b/moto/ec2/responses/windows.py index 5245c915a..4c600c9a3 100644 --- a/moto/ec2/responses/windows.py +++ b/moto/ec2/responses/windows.py @@ -16,4 +16,3 @@ class Windows(object): def get_password_data(self): raise NotImplementedError('Windows.get_password_data is not yet implemented') - diff --git a/moto/ses/utils.py b/moto/ses/utils.py index 836af7508..ad6c13dcc 100644 --- a/moto/ses/utils.py +++ b/moto/ses/utils.py @@ -8,11 +8,11 @@ def random_hex(length): def get_random_message_id(): return "{}-{}-{}-{}-{}-{}-{}".format( - random_hex(16), - random_hex(8), - random_hex(4), - random_hex(4), - random_hex(4), - random_hex(12), - random_hex(6), + random_hex(16), + random_hex(8), + random_hex(4), + random_hex(4), + random_hex(4), + random_hex(12), + random_hex(6), ) diff --git a/moto/sqs/models.py b/moto/sqs/models.py index 5a06fb536..6c2d91594 100644 --- a/moto/sqs/models.py +++ b/moto/sqs/models.py @@ -89,8 +89,10 @@ class SQSBackend(BaseBackend): def delete_message(self, queue_name, receipt_handle): queue = self.get_queue(queue_name) - new_messages = [message for message in queue.messages - if message.receipt_handle != receipt_handle] + new_messages = [ + message for message in queue.messages + if message.receipt_handle != receipt_handle + ] queue.message = new_messages diff --git a/tests/test_core/test_decorator_calls.py b/tests/test_core/test_decorator_calls.py index 4b58916a9..5bf78b45c 100644 --- a/tests/test_core/test_decorator_calls.py +++ b/tests/test_core/test_decorator_calls.py @@ -1,6 +1,6 @@ import boto from boto.exception import EC2ResponseError -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 @@ -36,4 +36,4 @@ def test_decorator_start_and_stop(): list(conn.get_all_instances()).should.equal([]) mock.stop() - expect(conn.get_all_instances.when.called_with()).should.throw(EC2ResponseError) + conn.get_all_instances.when.called_with().should.throw(EC2ResponseError) diff --git a/tests/test_dynamodb/test_dynamodb.py b/tests/test_dynamodb/test_dynamodb.py index 2731718a2..df31c2f3d 100644 --- a/tests/test_dynamodb/test_dynamodb.py +++ b/tests/test_dynamodb/test_dynamodb.py @@ -17,7 +17,8 @@ def test_list_tables(): @freeze_time("2012-01-14") @mock_dynamodb def test_describe_table(): - dynamodb_backend.create_table('messages', + dynamodb_backend.create_table( + 'messages', hash_key_attr='forum_name', hash_key_type='S', range_key_attr='subject', diff --git a/tests/test_ec2/test_amazon_dev_pay.py b/tests/test_ec2/test_amazon_dev_pay.py index ce011f70e..2d7566abe 100644 --- a/tests/test_ec2/test_amazon_dev_pay.py +++ b/tests/test_ec2/test_amazon_dev_pay.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_amis.py b/tests/test_ec2/test_amis.py index 4f3f95505..53a4e3b20 100644 --- a/tests/test_ec2/test_amis.py +++ b/tests/test_ec2/test_amis.py @@ -1,7 +1,7 @@ import boto from boto.exception import EC2ResponseError -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 @@ -36,4 +36,4 @@ def test_ami_pulls_attributes_from_instance(): image_id = conn.create_image(instance.id, "test-ami", "this is a test ami") image = conn.get_image(image_id) - expect(image.kernel_id).should.equal('test-kernel') + image.kernel_id.should.equal('test-kernel') diff --git a/tests/test_ec2/test_availability_zones_and_regions.py b/tests/test_ec2/test_availability_zones_and_regions.py index 4f1134e5a..e83e090a5 100644 --- a/tests/test_ec2/test_availability_zones_and_regions.py +++ b/tests/test_ec2/test_availability_zones_and_regions.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_customer_gateways.py b/tests/test_ec2/test_customer_gateways.py index c7f81133f..1b5c37a8e 100644 --- a/tests/test_ec2/test_customer_gateways.py +++ b/tests/test_ec2/test_customer_gateways.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_dhcp_options.py b/tests/test_ec2/test_dhcp_options.py index bb6d6a17f..37dcc2de4 100644 --- a/tests/test_ec2/test_dhcp_options.py +++ b/tests/test_ec2/test_dhcp_options.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_ec2_core.py b/tests/test_ec2/test_ec2_core.py index c07f5c809..7a99a3034 100644 --- a/tests/test_ec2/test_ec2_core.py +++ b/tests/test_ec2/test_ec2_core.py @@ -4,5 +4,7 @@ from moto import mock_ec2 @mock_ec2 def test_not_implemented_method(): - requests.post.when.called_with("https://ec2.us-east-1.amazonaws.com/", - data={'Action': ['foobar']}).should.throw(NotImplementedError) + requests.post.when.called_with( + "https://ec2.us-east-1.amazonaws.com/", + data={'Action': ['foobar']} + ).should.throw(NotImplementedError) diff --git a/tests/test_ec2/test_elastic_ip_addresses.py b/tests/test_ec2/test_elastic_ip_addresses.py index 28d8247d7..a7a0579c5 100644 --- a/tests/test_ec2/test_elastic_ip_addresses.py +++ b/tests/test_ec2/test_elastic_ip_addresses.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_elastic_network_interfaces.py b/tests/test_ec2/test_elastic_network_interfaces.py index 8dba98ec4..b0ee46b06 100644 --- a/tests/test_ec2/test_elastic_network_interfaces.py +++ b/tests/test_ec2/test_elastic_network_interfaces.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_general.py b/tests/test_ec2/test_general.py index 6d2a9a9cd..031bd2c1c 100644 --- a/tests/test_ec2/test_general.py +++ b/tests/test_ec2/test_general.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_internet_gateways.py b/tests/test_ec2/test_internet_gateways.py index 7d0d28f6b..ad039bed7 100644 --- a/tests/test_ec2/test_internet_gateways.py +++ b/tests/test_ec2/test_internet_gateways.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_ip_addresses.py b/tests/test_ec2/test_ip_addresses.py index b4c0f70a9..eecd3117b 100644 --- a/tests/test_ec2/test_ip_addresses.py +++ b/tests/test_ec2/test_ip_addresses.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_key_pairs.py b/tests/test_ec2/test_key_pairs.py index 77cb7e0aa..8d8d7b212 100644 --- a/tests/test_ec2/test_key_pairs.py +++ b/tests/test_ec2/test_key_pairs.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_monitoring.py b/tests/test_ec2/test_monitoring.py index 3a802beab..b534a508f 100644 --- a/tests/test_ec2/test_monitoring.py +++ b/tests/test_ec2/test_monitoring.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_network_acls.py b/tests/test_ec2/test_network_acls.py index 2cb9da16c..190f6f380 100644 --- a/tests/test_ec2/test_network_acls.py +++ b/tests/test_ec2/test_network_acls.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_placement_groups.py b/tests/test_ec2/test_placement_groups.py index fb7eb9623..adc913ccb 100644 --- a/tests/test_ec2/test_placement_groups.py +++ b/tests/test_ec2/test_placement_groups.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_reserved_instances.py b/tests/test_ec2/test_reserved_instances.py index ef2ca4c2f..8a99f5c23 100644 --- a/tests/test_ec2/test_reserved_instances.py +++ b/tests/test_ec2/test_reserved_instances.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_route_tables.py b/tests/test_ec2/test_route_tables.py index 1ae716471..57e85a4f7 100644 --- a/tests/test_ec2/test_route_tables.py +++ b/tests/test_ec2/test_route_tables.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_security_groups.py b/tests/test_ec2/test_security_groups.py index eb5a471b5..4cdb9a4eb 100644 --- a/tests/test_ec2/test_security_groups.py +++ b/tests/test_ec2/test_security_groups.py @@ -1,6 +1,6 @@ import boto from boto.exception import EC2ResponseError -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 @@ -10,7 +10,7 @@ def test_create_and_describe_security_group(): conn = boto.connect_ec2('the_key', 'the_secret') security_group = conn.create_security_group('test security group', 'this is a test security group') - expect(security_group.name).should.equal('test security group') + security_group.name.should.equal('test security group') security_group.description.should.equal('this is a test security group') # Trying to create another group with the same name should throw an error diff --git a/tests/test_ec2/test_spot_instances.py b/tests/test_ec2/test_spot_instances.py index 727ad64e7..603e4481b 100644 --- a/tests/test_ec2/test_spot_instances.py +++ b/tests/test_ec2/test_spot_instances.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_subnets.py b/tests/test_ec2/test_subnets.py index bf95d3a9a..f73a8feda 100644 --- a/tests/test_ec2/test_subnets.py +++ b/tests/test_ec2/test_subnets.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_virtual_private_gateways.py b/tests/test_ec2/test_virtual_private_gateways.py index 0267a7978..24e85b98d 100644 --- a/tests/test_ec2/test_virtual_private_gateways.py +++ b/tests/test_ec2/test_virtual_private_gateways.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_vm_export.py b/tests/test_ec2/test_vm_export.py index 7683e4203..6050a8c40 100644 --- a/tests/test_ec2/test_vm_export.py +++ b/tests/test_ec2/test_vm_export.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_vm_import.py b/tests/test_ec2/test_vm_import.py index 193cf6e34..ef3e5e1a5 100644 --- a/tests/test_ec2/test_vm_import.py +++ b/tests/test_ec2/test_vm_import.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_vpcs.py b/tests/test_ec2/test_vpcs.py index d74a0ad15..703612a0f 100644 --- a/tests/test_ec2/test_vpcs.py +++ b/tests/test_ec2/test_vpcs.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_vpn_connections.py b/tests/test_ec2/test_vpn_connections.py index 645f4aa2c..589d11952 100644 --- a/tests/test_ec2/test_vpn_connections.py +++ b/tests/test_ec2/test_vpn_connections.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_ec2/test_windows.py b/tests/test_ec2/test_windows.py index f705e4f62..960538465 100644 --- a/tests/test_ec2/test_windows.py +++ b/tests/test_ec2/test_windows.py @@ -1,5 +1,5 @@ import boto -from sure import expect +import sure # flake8: noqa from moto import mock_ec2 diff --git a/tests/test_s3/test_s3.py b/tests/test_s3/test_s3.py index e8ccb9075..d7f46b748 100644 --- a/tests/test_s3/test_s3.py +++ b/tests/test_s3/test_s3.py @@ -5,7 +5,7 @@ from boto.exception import S3ResponseError from boto.s3.key import Key import requests -from sure import expect +import sure # flake8: noqa from moto import mock_s3 @@ -33,7 +33,7 @@ def test_my_model_save(): model_instance = MyModel('steve', 'is awesome') model_instance.save() - expect(conn.get_bucket('mybucket').get_key('steve').get_contents_as_string()).should.equal('is awesome') + conn.get_bucket('mybucket').get_key('steve').get_contents_as_string().should.equal('is awesome') @mock_s3 diff --git a/tests/test_ses/test_ses.py b/tests/test_ses/test_ses.py index 934742c6f..cde6b76b6 100644 --- a/tests/test_ses/test_ses.py +++ b/tests/test_ses/test_ses.py @@ -3,7 +3,7 @@ import email import boto from boto.exception import BotoServerError -from sure import expect +import sure # flake8: noqa from moto import mock_ses diff --git a/tests/test_sqs/test_sqs.py b/tests/test_sqs/test_sqs.py index 31da6368d..abad3080c 100644 --- a/tests/test_sqs/test_sqs.py +++ b/tests/test_sqs/test_sqs.py @@ -1,7 +1,7 @@ import boto from boto.exception import SQSError import requests -from sure import expect +import sure # flake8: noqa from moto import mock_sqs @@ -12,7 +12,7 @@ def test_create_queue(): conn.create_queue("test-queue", visibility_timeout=60) all_queues = conn.get_all_queues() - expect(all_queues[0].name).should.equal("test-queue") + all_queues[0].name.should.equal("test-queue") all_queues[0].get_timeout().should.equal(60)