]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
test_boto cleanup
authorIvan Malison <imalison@uber.com>
Fri, 28 Aug 2015 20:03:09 +0000 (13:03 -0700)
committerIvan Malison <imalison@uber.com>
Fri, 28 Aug 2015 20:03:09 +0000 (13:03 -0700)
tests/integration/test_boto.py

index e4261a835427c8ffc7b0c6cf88b05e21b85c7226..d00cf27b79e3997bc0a60e44f8be971948e800ac 100644 (file)
@@ -1,5 +1,6 @@
 import pytest
 boto = pytest.importorskip("boto")
+
 import boto
 import boto.iam
 from boto.s3.connection import S3Connection
@@ -7,6 +8,7 @@ from boto.s3.key import Key
 from ConfigParser import DuplicateSectionError
 import vcr
 
+
 def test_boto_stubs(tmpdir):
     with vcr.use_cassette(str(tmpdir.join('boto-stubs.yml'))):
         # Perform the imports within the patched context so that
@@ -17,16 +19,18 @@ def test_boto_stubs(tmpdir):
         assert issubclass(CertValidatingHTTPSConnection, VCRCertValidatingHTTPSConnection)
         CertValidatingHTTPSConnection('hostname.does.not.matter')
 
+
 def test_boto_without_vcr():
     s3_conn = S3Connection()
-    s3_bucket = s3_conn.get_bucket('boto-demo-1394171994') # a bucket you can access
+    s3_bucket = s3_conn.get_bucket('boto-demo-1394171994')  # a bucket you can access
     k = Key(s3_bucket)
     k.key = 'test.txt'
     k.set_contents_from_string('hello world i am a string')
 
+
 def test_boto_medium_difficulty(tmpdir):
     s3_conn = S3Connection()
-    s3_bucket = s3_conn.get_bucket('boto-demo-1394171994') # a bucket you can access
+    s3_bucket = s3_conn.get_bucket('boto-demo-1394171994')  # a bucket you can access
     with vcr.use_cassette(str(tmpdir.join('boto-medium.yml'))) as cass:
         k = Key(s3_bucket)
         k.key = 'test.txt'
@@ -41,18 +45,19 @@ def test_boto_medium_difficulty(tmpdir):
 def test_boto_hardcore_mode(tmpdir):
     with vcr.use_cassette(str(tmpdir.join('boto-hardcore.yml'))) as cass:
         s3_conn = S3Connection()
-        s3_bucket = s3_conn.get_bucket('boto-demo-1394171994') # a bucket you can access
+        s3_bucket = s3_conn.get_bucket('boto-demo-1394171994')  # a bucket you can access
         k = Key(s3_bucket)
         k.key = 'test.txt'
         k.set_contents_from_string('hello world i am a string')
 
     with vcr.use_cassette(str(tmpdir.join('boto-hardcore.yml'))) as cass:
         s3_conn = S3Connection()
-        s3_bucket = s3_conn.get_bucket('boto-demo-1394171994') # a bucket you can access
+        s3_bucket = s3_conn.get_bucket('boto-demo-1394171994')  # a bucket you can access
         k = Key(s3_bucket)
         k.key = 'test.txt'
         k.set_contents_from_string('hello world i am a string')
 
+
 def test_boto_iam(tmpdir):
     try:
         boto.config.add_section('Boto')