Skip to content

Commit

Permalink
Merge pull request #2009 from dandi/fix-lint
Browse files Browse the repository at this point in the history
Apply new `ruff` rules
  • Loading branch information
mvandenburgh authored Aug 20, 2024
2 parents 62442c9 + 9ad1189 commit 6e4bf72
Show file tree
Hide file tree
Showing 24 changed files with 277 additions and 277 deletions.
10 changes: 5 additions & 5 deletions dandiapi/analytics/tests/test_download_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
from dandiapi.api.storage import create_s3_storage, get_boto_client


@pytest.fixture()
@pytest.fixture
def s3_log_bucket():
return create_s3_storage(settings.DANDI_DANDISETS_LOG_BUCKET_NAME).bucket_name


@pytest.fixture()
@pytest.fixture
def s3_log_file(s3_log_bucket, asset_blob):
s3 = get_boto_client()

Expand Down Expand Up @@ -44,7 +44,7 @@ def s3_log_file(s3_log_bucket, asset_blob):
s3.delete_object(Bucket=s3_log_bucket, Key=log_file_name)


@pytest.mark.django_db()
@pytest.mark.django_db
def test_processing_s3_log_files(s3_log_file, asset_blob):
collect_s3_log_records_task()
asset_blob.refresh_from_db()
Expand All @@ -53,7 +53,7 @@ def test_processing_s3_log_files(s3_log_file, asset_blob):
assert asset_blob.download_count == 1


@pytest.mark.django_db()
@pytest.mark.django_db
def test_processing_s3_log_files_idempotent(s3_log_file, asset_blob):
# this tests that the outer task which collects the log files to process is
# idempotent, in other words, it uses StartAfter correctly.
Expand All @@ -66,7 +66,7 @@ def test_processing_s3_log_files_idempotent(s3_log_file, asset_blob):
assert asset_blob.download_count == 1


@pytest.mark.django_db()
@pytest.mark.django_db
def test_processing_s3_log_file_task_idempotent(s3_log_file, asset_blob):
# this tests that the inner task which processes a single log file is
# idempotent, utilizing the unique constraint on ProcessedS3Log correctly.
Expand Down
Loading

0 comments on commit 6e4bf72

Please sign in to comment.