This repository has been archived on 2026-03-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
docs/src/backend/demo/tests/test_commands_create_demo.py

19 lines
442 B
Python
Raw Normal View History

"""Test the `create_demo` management command"""
from django.core.management import call_command
from django.test import override_settings
import pytest
from core import models
pytestmark = pytest.mark.django_db
@override_settings(DEBUG=True)
def test_commands_create_demo():
"""The create_demo management command should create objects as expected."""
call_command("create_demo")
assert models.Template.objects.count() == 1