Pyflakes cleanup.

This commit is contained in:
Tommi Virtanen 2011-07-11 13:12:47 -07:00
parent 31d9032ea5
commit e91a3aea66
3 changed files with 1 additions and 8 deletions

View file

@ -1,16 +1,11 @@
#! /usr/bin/python #! /usr/bin/python
from boto.s3.connection import OrdinaryCallingFormat
from boto.s3.connection import S3Connection
from boto.s3.key import Key from boto.s3.key import Key
from optparse import OptionParser from optparse import OptionParser
from realistic import RandomContentFile
import realistic import realistic
import traceback import traceback
import random import random
import common import common
import yaml
import boto
import sys import sys

View file

@ -74,7 +74,7 @@ def writer(seconds, bucket, name=None, queue=None, quantity=1, file_size=1, file
files = generate_objects.get_random_files(quantity, 1024*file_size, 1024*file_stddev, r) files = generate_objects.get_random_files(quantity, 1024*file_size, 1024*file_stddev, r)
start = time.clock() start = time.clock()
keys = generate_objects.upload_objects(bucket, files, r2) generate_objects.upload_objects(bucket, files, r2)
end = time.clock() end = time.clock()
elapsed = end - start elapsed = end - start

View file

@ -9,7 +9,6 @@ import operator
import os import os
import random import random
import string import string
import time
import socket import socket
from nose.tools import eq_ as eq from nose.tools import eq_ as eq
@ -831,7 +830,6 @@ def test_object_set_valid_acl():
key.set_xml_acl(XML_1) key.set_xml_acl(XML_1)
def test_object_giveaway(): def test_object_giveaway():
obj = _setup_access(bucket_acl='public-read', object_acl='public-read-write')
CORRECT_ACL = '<?xml version="1.0" encoding="UTF-8"?><AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>' + config.main.user_id + '</ID></Owner><AccessControlList><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID>' + config.main.user_id + '</ID></Grantee><Permission>FULL_CONTROL</Permission></Grant></AccessControlList></AccessControlPolicy>' CORRECT_ACL = '<?xml version="1.0" encoding="UTF-8"?><AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>' + config.main.user_id + '</ID></Owner><AccessControlList><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID>' + config.main.user_id + '</ID></Grantee><Permission>FULL_CONTROL</Permission></Grant></AccessControlList></AccessControlPolicy>'
WRONG_ACL = '<?xml version="1.0" encoding="UTF-8"?><AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>' + config.alt.user_id + '</ID></Owner><AccessControlList><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID>' + config.alt.user_id + '</ID></Grantee><Permission>FULL_CONTROL</Permission></Grant></AccessControlList></AccessControlPolicy>' WRONG_ACL = '<?xml version="1.0" encoding="UTF-8"?><AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Owner><ID>' + config.alt.user_id + '</ID></Owner><AccessControlList><Grant><Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID>' + config.alt.user_id + '</ID></Grantee><Permission>FULL_CONTROL</Permission></Grant></AccessControlList></AccessControlPolicy>'
bucket = get_new_bucket() bucket = get_new_bucket()