From 2c324038c9f76fccc60dce5deb6311a1d739e756 Mon Sep 17 00:00:00 2001 From: Restioson Date: Thu, 7 Nov 2024 11:03:10 +0200 Subject: [PATCH] chore(makefile): allow migration & app to be specified in `make migrate` The migration and appto migrate to can now be specified by setting the `migration_args` Makefile variable on the command line, e.g. `make migrate migration_args="general 0013"`. --- Makefile | 2 +- app/general/tests/test_document_admin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c0551aa..58da011 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ make-migrations: @docker compose run --rm web python manage.py makemigrations migrate: - @docker compose run --rm web python manage.py migrate + @docker compose run --rm web python manage.py migrate $(migration_args) collectstatic: @docker compose run --rm web python manage.py collectstatic --noinput diff --git a/app/general/tests/test_document_admin.py b/app/general/tests/test_document_admin.py index a3c6bf4..3b31e3d 100644 --- a/app/general/tests/test_document_admin.py +++ b/app/general/tests/test_document_admin.py @@ -9,7 +9,7 @@ from general.models import Document, Institution -class TestDocumentForm(unittest.TestCase): +class TestDocumentForm(TestCase): def __init__(self, methodName: str = "runTest"): super().__init__(methodName) self.form = None