Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sarayourfriend committed Mar 2, 2022
1 parent a8e2b5d commit 3d7fb7a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions api/test/factory/models/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import factory
from catalog.api.licenses import LICENSES
from catalog.api.models.media import AbstractMedia
from factory.django import DjangoModelFactory


Expand All @@ -18,7 +17,9 @@ class Meta:
foreign_identifier = factory.sequence(lambda _: uuid4())
"""The foreign identifier isn't necessarily a UUID but for test purposes it's fine if it looks like one"""

license = Faker("random_element", elements=[l[0] for l in LICENSES])
license = Faker(
"random_element", elements=[the_license[0] for the_license in LICENSES]
)

foreign_landing_url = Faker("url")

Expand Down
8 changes: 6 additions & 2 deletions api/test/unit/management/commands/generatewaveforms_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_does_not_reprocess_existing_waveforms():

# AudioAddOnFactory will create associated Audio objects as well
# so those three will serve as the audio that should _not_ get processed
waveforms = AudioAddOnFactory.create_batch(3)
AudioAddOnFactory.create_batch(3)

# Create an add on that doesn't have a waveform, this one should get processed as well
null_waveform_addon = AudioAddOnFactory.create(waveform_peaks=None)
Expand Down Expand Up @@ -105,7 +105,11 @@ def test_paginates_audio_waveforms_to_generate(
(1, "audiowaveform"),
{"stderr": b"This is an error string"},
),
(psycopg2.errors.lookup(psycopg2.errorcodes.NOT_NULL_VIOLATION), tuple(), dict()),
(
psycopg2.errors.lookup(psycopg2.errorcodes.NOT_NULL_VIOLATION),
tuple(),
dict(),
),
),
)
@mock.patch("catalog.api.models.audio.generate_peaks")
Expand Down

0 comments on commit 3d7fb7a

Please sign in to comment.