funkwhale/api/tests/music/test_import.py

16 wiersze
360 B
Python

import os
import uuid
2018-02-22 22:33:29 +00:00
import pytest
from django import forms
2018-02-22 22:33:29 +00:00
from funkwhale_api.music import importers, models
DATA_DIR = os.path.dirname(os.path.abspath(__file__))
2018-02-22 22:33:29 +00:00
def test_importer_cleans():
importer = importers.Importer(models.Artist)
with pytest.raises(forms.ValidationError):
importer.load({"name": "", "mbid": uuid.uuid4()}, {}, [])