funkwhale/api/tests/music/test_import.py

17 wiersze
391 B
Python
Czysty Zwykły widok Historia

import os
import pytest
import uuid
2018-02-22 22:33:29 +00:00
from django import forms
2018-02-22 22:33:29 +00:00
from funkwhale_api.music import importers
from funkwhale_api.music import 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()}, {}, [])