From 6c91cb008c2b12b9e022de10a1536968badf3ef0 Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 5 May 2025 04:35:09 +0930 Subject: [PATCH] chore(itam): just add this fucking thing cause vscode is a cunt and wont pick up the test correctly as its using an old value that does not exist even though the fucking code works directly from the console via pytest. ref: #741 #692 --- app/accounting/tests/__init__.py | 0 app/app/tests/unit/test_unit_models.py | 7 +++++++ app/conftest.py | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 app/accounting/tests/__init__.py diff --git a/app/accounting/tests/__init__.py b/app/accounting/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/app/app/tests/unit/test_unit_models.py b/app/app/tests/unit/test_unit_models.py index 2611e616..22567fa7 100644 --- a/app/app/tests/unit/test_unit_models.py +++ b/app/app/tests/unit/test_unit_models.py @@ -606,6 +606,13 @@ class PyTestTenancyObjectInheritedCases( ): + parameterized_fields: dict = { + "model_notes": { + 'field_type': fields.TextField, + 'field_parameter_verbose_name_type': str + } + } + def test_create_validation_exception_no_organization(self): """ Tenancy objects must have an organization diff --git a/app/conftest.py b/app/conftest.py index 5a5c4068..c954354f 100644 --- a/app/conftest.py +++ b/app/conftest.py @@ -189,7 +189,7 @@ def pytest_generate_tests(metafunc): if type(item[1][key]) is type: - ids_name += '_' + getattr(item[1][key], '__name__', 'None').lower() + ids_name += '_' + getattr(item[1][key], '__name__', 'err_generate_tests').lower() else: