from django.test import SimpleTestCase

from apps.billboard.forms import (
    EMPTY_LINE_ERROR,
    LineForm,
)


class SimpleLineFormTest(SimpleTestCase):
    def test_form_validation_for_blank_lines(self):
        form = LineForm(data={"text": ""})
        self.assertFalse(form.is_valid())
        self.assertEqual(form.errors["text"], [EMPTY_LINE_ERROR])
