diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index ca1ffad32..c4934e637 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -433,9 +433,7 @@ def remove_aws_dockerfile(): def remove_drf_starter_files(): os.remove(os.path.join("config", "api_router.py")) shutil.rmtree(os.path.join("{{cookiecutter.project_slug}}", "users", "api")) - os.remove(os.path.join("{{cookiecutter.project_slug}}", "users", "tests", "test_drf_urls.py")) - os.remove(os.path.join("{{cookiecutter.project_slug}}", "users", "tests", "test_drf_views.py")) - os.remove(os.path.join("{{cookiecutter.project_slug}}", "users", "tests", "test_swagger.py")) + shutil.rmtree(os.path.join("{{cookiecutter.project_slug}}", "users", "tests", "api")) def main(): diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/api/__init__.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/api/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_swagger.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/api/test_swagger.py similarity index 100% rename from {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_swagger.py rename to {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/api/test_swagger.py diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_drf_urls.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/api/test_urls.py similarity index 100% rename from {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_drf_urls.py rename to {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/api/test_urls.py diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_drf_views.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/api/test_views.py similarity index 100% rename from {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_drf_views.py rename to {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/api/test_views.py