from django.core.exceptions import ValidationError
from django.test import TestCase

from core.models import Document


class DocumentTests(TestCase):
    def test_document_requires_business_relation(self):
        document = Document(title="Documento isolado")
        with self.assertRaises(ValidationError):
            document.full_clean()
