diff --git a/src/backend/InvenTree/common/migrations/0023_auto_20240602_1332.py b/src/backend/InvenTree/common/migrations/0023_auto_20240602_1332.py index a3cc1fd02a..3c29bda31f 100644 --- a/src/backend/InvenTree/common/migrations/0023_auto_20240602_1332.py +++ b/src/backend/InvenTree/common/migrations/0023_auto_20240602_1332.py @@ -44,7 +44,7 @@ def set_currencies(apps, schema_editor): valid_codes.add(code) if len(valid_codes) == 0: - print(f"No valid currency codes found in configuration file") + print(f"No currency codes found in configuration file - skipping migration") return value = ','.join(valid_codes) diff --git a/src/backend/InvenTree/common/test_migrations.py b/src/backend/InvenTree/common/test_migrations.py index 74b899f3f8..6c21dc1074 100644 --- a/src/backend/InvenTree/common/test_migrations.py +++ b/src/backend/InvenTree/common/test_migrations.py @@ -7,8 +7,6 @@ from django.core.files.base import ContentFile from django_test_migrations.contrib.unittest_case import MigratorTestCase -from InvenTree import unit_test - def get_legacy_models(): """Return a set of legacy attachment models.""" @@ -43,7 +41,7 @@ class TestForwardMigrations(MigratorTestCase): """Test entire schema migration sequence for the common app.""" migrate_from = ('common', '0024_notesimage_model_id_notesimage_model_type') - migrate_to = ('common', unit_test.getNewestMigrationFile('common')) + migrate_to = ('common', '0039_emailthread_emailmessage') def prepare(self): """Create initial data. diff --git a/src/backend/InvenTree/part/test_api.py b/src/backend/InvenTree/part/test_api.py index 8f72bfc9f8..6f05c6f130 100644 --- a/src/backend/InvenTree/part/test_api.py +++ b/src/backend/InvenTree/part/test_api.py @@ -3047,13 +3047,13 @@ class BomItemTest(InvenTreeAPITestCase): self.assertAlmostEqual(can_build, 482.9, places=1) -class PartAttachmentTest(InvenTreeAPITestCase): - """Unit tests for the PartAttachment API endpoint.""" +class AttachmentTest(InvenTreeAPITestCase): + """Unit tests for the Attachment API endpoint.""" fixtures = ['category', 'part', 'location'] def test_add_attachment(self): - """Test that we can create a new PartAttachment via the API.""" + """Test that we can create a new Attachment instances via the API.""" url = reverse('api-attachment-list') # Upload without permission