def test_is_sync_not_needed(self):
        mocked_key1 = mock.Mock()
        mocked_key1.etag = '"de3a2ccff42d63dc60c6955634d122da"'

        mocked_file_path = sandbox + '/a.txt'

        with open(mocked_file_path, 'wb') as f:
            f.write('mocked file')

        download = s3concurrent.is_sync_needed(mocked_key1, mocked_file_path)
        self.assertFalse(download)
    def test_is_sync_needed(self):
        mocked_key1 = mock.Mock()
        mocked_key1.etag = ''

        mocked_file_path = sandbox + '/a.txt'

        with open(mocked_file_path, 'wb') as f:
            f.write('mocked file')

        download = s3concurrent.is_sync_needed(mocked_key1, mocked_file_path)
        self.assertTrue(download)
    def test_is_sync_not_needed(self):
        mocked_key1 = mock.Mock()
        mocked_key1.etag = '"de3a2ccff42d63dc60c6955634d122da"'

        mocked_file_path = sandbox + '/a.txt'

        with open(mocked_file_path, 'wb') as f:
            f.write('mocked file')

        download = s3concurrent.is_sync_needed(mocked_key1, mocked_file_path)
        self.assertFalse(download)
    def test_is_sync_needed(self):
        mocked_key1 = mock.Mock()
        mocked_key1.etag = ''

        mocked_file_path = sandbox + '/a.txt'

        with open(mocked_file_path, 'wb') as f:
            f.write('mocked file')

        download = s3concurrent.is_sync_needed(mocked_key1, mocked_file_path)
        self.assertTrue(download)
 def test_is_sync_needed_error(self, mocked_read_md5):
     mocked_key1 = mock.Mock()
     download = s3concurrent.is_sync_needed(mocked_key1, sandbox + '/a.txt')
     self.assertTrue(download)
 def test_is_sync_needed_error(self, mocked_read_md5):
     mocked_key1 = mock.Mock()
     download = s3concurrent.is_sync_needed(mocked_key1, sandbox + '/a.txt')
     self.assertTrue(download)