refactor(api): fix pylint errors

This commit is contained in:
jo 2022-04-01 17:29:11 +02:00 committed by Kyle Robbertze
parent bf8db3e6f0
commit 0bbd46c33f
14 changed files with 159 additions and 169 deletions

View file

@ -1,5 +1,3 @@
import os
from django.conf import settings
from model_bakery import baker
from rest_framework.test import APITestCase
@ -30,13 +28,13 @@ class TestFileViewSet(APITestCase):
"storage.MusicDir",
directory=str(fixture_path),
)
f = baker.make(
file = baker.make(
"storage.File",
directory=music_dir,
mime="audio/mp3",
filepath=AUDIO_FILENAME,
)
path = self.path.format(id=str(f.pk))
path = self.path.format(id=str(file.pk))
self.client.credentials(HTTP_AUTHORIZATION=f"Api-Key {self.token}")
response = self.client.get(path)
self.assertEqual(response.status_code, 200)