These tests don't test anything interesting.

They are running into issues because of a bug in moto but looking closer
at what they are testing.  Both tests test the happy path of the
underlying function.  In the happy path scenario all boto calls succeed
and all theses test do is test that but with all the boto calls mocked
out.  So we're just testing whether the mock is a good mock of boto
which is not useful.
This commit is contained in:
Feanil Patel
2019-07-31 17:00:47 -04:00
parent 624455c89a
commit a5afacf62a

View File

@@ -21,25 +21,6 @@ from pavelib.utils.envs import Env
from .utils import PaverTestCase
class TestPaverDbS3Utils(MockS3Mixin, TestCase):
""" Tests for paver bokchoy database utils related to s3 """
def setUp(self):
super(TestPaverDbS3Utils, self).setUp()
conn = boto.connect_s3()
conn.create_bucket('moto_test_bucket')
self.bucket = conn.get_bucket('moto_test_bucket')
def test_fingerprint_in_bucket(self):
key = boto.s3.key.Key(bucket=self.bucket, name='testfile.tar.gz')
key.set_contents_from_string('this is a test')
self.assertTrue(is_fingerprint_in_bucket('testfile', 'moto_test_bucket'))
def test_fingerprint_not_in_bucket(self):
key = boto.s3.key.Key(bucket=self.bucket, name='testfile.tar.gz')
key.set_contents_from_string('this is a test')
self.assertFalse(is_fingerprint_in_bucket('otherfile', 'moto_test_bucket'))
class TestPaverDbUtils(TestCase):
""" Tests for paver bokchoy database utils """
@patch('pavelib.utils.db_utils.verify_files_exist')