import pytest

from components.accounts.factories import EditorFactory
from components.accounts.models import Editor

pytestmark = pytest.mark.django_db


class TestEditors:
    def test_factory(self):
        factory = EditorFactory()
        assert isinstance(factory, Editor)
        assert 'dancer' in factory.username

    def test_failing_creation(self):
        with pytest.raises(ValueError):
            Editor.objects.create_user(username='')

@@ -446,8 +446,307 @@
 ame='')%0A
+%0A    def test_get_full_name(self):%0A        factory = EditorFactory(username='bryan', name='Bryan')%0A        assert factory.get_full_name() == 'Bryan'%0A%0A    def test_get_short_name(self):%0A        factory = EditorFactory(username='bryan', name='Bryan')%0A        assert factory.get_short_name() == 'Bryan'

Test get_full_name() and get_short_name().