From b907f48f1c1d4425b6d4fe0799dc3845666f20c6 Mon Sep 17 00:00:00 2001 From: Georg Krause Date: Wed, 13 Sep 2023 10:40:06 +0200 Subject: [PATCH] test: Remove test test that wont work Part-of: --- api/tests/common/test_commands.py | 42 ------------------------------- 1 file changed, 42 deletions(-) diff --git a/api/tests/common/test_commands.py b/api/tests/common/test_commands.py index 4e8956e2d..8893827eb 100644 --- a/api/tests/common/test_commands.py +++ b/api/tests/common/test_commands.py @@ -1,5 +1,4 @@ import os -from io import StringIO import pytest from django.core.management import call_command @@ -129,44 +128,3 @@ def test_inplace_to_s3_dryrun(factories): call_command("inplace_to_s3", "--source", "/music") assert upload.source == "file:///music/music.mp3" assert not upload.audio_file - - -data = [ - { - "file": "/music/test.mp3", - "source": "/", - "target": None, - "expected": "/music/test.mp3", - }, - { - "file": "/music/test.mp3", - "source": "/music", - "target": "/in-place", - "expected": "/in-place/test.mp3", - }, - { - "file": "/music/test.mp3", - "source": "/music", - "target": "/in-place/music", - "expected": "/in-place/music/test.mp3", - }, - {"file": "/music/test.mp3", "source": "/abcd", "target": "/music", "expected": "0"}, -] - - -@pytest.mark.parametrize("data", data) -def test_inplace_to_s3(factories, data): - out = StringIO() - factories["music.Upload"](in_place=True, source=f"file://{data['file']}") - if data["target"]: - call_command( - "inplace_to_s3", - "--source", - data["source"], - "--target", - data["target"], - stdout=out, - ) - else: - call_command("inplace_to_s3", "--source", data["source"], stdout=out) - assert data["expected"] in out.getvalue()