From 116e66ca11950e8e91f97246ee600691b4c0b5d8 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 21 May 2024 23:47:17 +1000 Subject: [PATCH] Unit Test Updates (#230) * Update API level for "modern" report templates * Fix unit test --- inventree/label.py | 2 +- inventree/report.py | 2 +- test/test_part.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inventree/label.py b/inventree/label.py index e3d29c1..5c662a5 100644 --- a/inventree/label.py +++ b/inventree/label.py @@ -9,7 +9,7 @@ # The InvenTree API endpoint changed considerably @ version 197 # Ref: https://github.com/inventree/InvenTree/pull/7074 -MODERN_LABEL_PRINTING_API = 198 +MODERN_LABEL_PRINTING_API = 201 class LabelPrintingMixin: diff --git a/inventree/report.py b/inventree/report.py index aff9e6e..e34e99f 100644 --- a/inventree/report.py +++ b/inventree/report.py @@ -5,7 +5,7 @@ # The InvenTree API endpoint changed considerably @ version 197 # Ref: https://github.com/inventree/InvenTree/pull/7074 -MODERN_LABEL_PRINTING_API = 198 +MODERN_LABEL_PRINTING_API = 201 class ReportPrintingMixin: diff --git a/test/test_part.py b/test/test_part.py index 5f7fbb7..301b439 100644 --- a/test/test_part.py +++ b/test/test_part.py @@ -394,7 +394,7 @@ def test_part_delete(self): with self.assertRaises(requests.exceptions.HTTPError) as ar: response = p.delete() - self.assertIn("is active: cannot delete", str(ar.exception)) + self.assertIn("Cannot delete this part as it is still active", str(ar.exception)) p.save(data={'active': False}) response = p.delete()