"""Aws helper unit tests.""" from snapshot_adjustments.aws_helper import build_snapshot_path from snapshot_adjustments.config import S3_BUCKET_SALES def test_build_snapshot_path(): """Test creating s3 path from accounting run detail.""" accounting_run = { 'accounting_period_id': 12, 'accounting_period_name': 'Period Name', 'accounting_run_id': 123, 'run_controller_name': 'RC Name' } acct_period_prefix = '12-period-name' acct_run_prefix = '123-rc-name' expected_path = \ f's3://{S3_BUCKET_SALES}/{acct_period_prefix}/{acct_run_prefix}/snapshots' res = build_snapshot_path(accounting_run) assert res == expected_path