def test_successful_sync(call): env = dict(CHIRP_S3_BUCKET='bucket', CHIRP_ARCHIVES_DIR='/this/archives') call.expects_call().returns(0).with_args([sync.which('s3cmd'), 'sync', '--skip-existing', '/this/archives', 's3://bucket/archives']) call_sync(environ=env)
def test_full_sync(call): env = dict(CHIRP_S3_BUCKET='bucket', CHIRP_ARCHIVES_DIR='/this/archives') call.expects_call().returns(0).with_args([sync.which('s3cmd'), 'sync', '/this/archives', 's3://bucket/archives']) call_sync(args=['--full'], environ=env)