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

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='')

Add a silly failing test.
Add a silly failing test.

  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='')
+ 
Add a silly failing test.
## Code Before:
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

## Instruction:
Add a silly failing test.
## Code After:
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='')
