series of tests added with built-in django test support

This commit is contained in:
pacnpal
2024-11-05 18:40:39 +00:00
parent ba226c861a
commit 2e8a725933
60 changed files with 2108 additions and 274 deletions

View File

@@ -10,8 +10,8 @@ def forwards_func(apps, schema_editor):
ContentType = apps.get_model("contenttypes", "ContentType")
db_alias = schema_editor.connection.alias
# Get content type for Park model
park_content_type = ContentType.objects.db_manager(db_alias).get(
# Get or create content type for Park model
park_content_type, created = ContentType.objects.db_manager(db_alias).get_or_create(
app_label='parks',
model='park'
)
@@ -42,8 +42,8 @@ def reverse_func(apps, schema_editor):
ContentType = apps.get_model("contenttypes", "ContentType")
db_alias = schema_editor.connection.alias
# Get content type for Park model
park_content_type = ContentType.objects.db_manager(db_alias).get(
# Get or create content type for Park model
park_content_type, created = ContentType.objects.db_manager(db_alias).get_or_create(
app_label='parks',
model='park'
)