6 Commits

Author SHA1 Message Date
arian 93010caee4 Merge branch 'e2e-testing'
Build and Test Debian Package / build (push) Successful in 28s
Build and Test Debian Package / test (push) Successful in 14s
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-06-05 05:47:33 -04:00
arian ded42ccd03 chore(deps): bump python dependencies
Build and Test Debian Package / build (push) Successful in 33s
Build and Test Debian Package / test (push) Successful in 52s
2026-06-04 19:36:30 -04:00
arian 9255f9b052 refactor(tests): remove a test
Build and Test Debian Package / build (push) Successful in 28s
Build and Test Debian Package / test (push) Successful in 30s
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-06-01 03:37:18 -04:00
arian 6e22dcdda5 fix(tests): change edge case file extension
Build and Test Debian Package / build (push) Successful in 27s
Build and Test Debian Package / test (push) Failing after 32s
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-06-01 03:34:41 -04:00
arian ef1e42bcbb feat(tests): additional tests for uploads
Build and Test Debian Package / build (push) Successful in 28s
Build and Test Debian Package / test (push) Failing after 31s
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-06-01 03:31:26 -04:00
arian 0912c338e3 chore(debian): v0.3.0 changelog added
Build and Test Debian Package / build (push) Successful in 7m11s
Build and Test Debian Package / test (push) Successful in 3m50s
Signed-off-by: Arian Nasr <arian@2ari.ca>
2026-05-31 09:03:35 -04:00
2 changed files with 34 additions and 1 deletions
+33
View File
@@ -18,5 +18,38 @@ def test_api_upload_non_audio_file(base_url, upload_folder):
assert "not allowed" in response.json().get("error", "")
assert not os.path.exists(expected_filename)
if os.path.exists(expected_filename):
os.remove(expected_filename)
def test_api_upload_mp3_file(base_url, upload_folder):
files = {'file': ('test.mp3', io.BytesIO(b'fake mp3 content'))}
expected_filename = os.path.join(upload_folder, secure_filename('test.mp3'))
response = requests.post(f'{base_url}/', files=files)
assert response.status_code == 200
assert "uploaded successfully" in response.json().get("message", "")
assert os.path.exists(expected_filename)
if os.path.exists(expected_filename):
os.remove(expected_filename)
def test_api_upload_flac_file(base_url, upload_folder):
files = {'file': ('test.flac', io.BytesIO(b'fake flac content'))}
expected_filename = os.path.join(upload_folder, secure_filename('test.flac'))
response = requests.post(f'{base_url}/', files=files)
assert response.status_code == 200
assert "uploaded successfully" in response.json().get("message", "")
assert os.path.exists(expected_filename)
if os.path.exists(expected_filename):
os.remove(expected_filename)
def test_api_upload_m4a_file(base_url, upload_folder):
files = {'file': ('test.m4a', io.BytesIO(b'fake m4a content'))}
expected_filename = os.path.join(upload_folder, secure_filename('test.m4a'))
response = requests.post(f'{base_url}/', files=files)
assert response.status_code == 400
assert "not allowed" in response.json().get("error", "")
assert not os.path.exists(expected_filename)
if os.path.exists(expected_filename):
os.remove(expected_filename)
+1 -1
View File
@@ -6,5 +6,5 @@ Jinja2==3.1.6
MarkupSafe==3.0.3
Werkzeug==3.1.8
gunicorn==26.0.0
pip==26.1.1
pip==26.1.2
packaging==26.2