diff --git a/api/test/factory/models/media.py b/api/test/factory/models/media.py index fa9584fed..196a055f6 100644 --- a/api/test/factory/models/media.py +++ b/api/test/factory/models/media.py @@ -3,7 +3,6 @@ import factory from catalog.api.licenses import LICENSES -from catalog.api.models.media import AbstractMedia from factory.django import DjangoModelFactory @@ -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") diff --git a/api/test/unit/management/commands/generatewaveforms_test.py b/api/test/unit/management/commands/generatewaveforms_test.py index fb212640f..80d5a4e06 100644 --- a/api/test/unit/management/commands/generatewaveforms_test.py +++ b/api/test/unit/management/commands/generatewaveforms_test.py @@ -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) @@ -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")