2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 03:30:54 +00:00

Add mathematical operator tags to report templates (#4443)

This commit is contained in:
Oliver
2023-03-03 21:42:04 +11:00
committed by GitHub
parent cce0fe8236
commit 575d62bff4
2 changed files with 32 additions and 0 deletions

View File

@ -137,6 +137,14 @@ class ReportTagTest(TestCase):
logo = report_tags.logo_image()
self.assertIn('inventree.png', logo)
def test_maths_tags(self):
"""Simple tests for mathematical operator tags"""
self.assertEqual(report_tags.add(1, 2), 3)
self.assertEqual(report_tags.subtract(10, 4.2), 5.8)
self.assertEqual(report_tags.multiply(2.3, 4), 9.2)
self.assertEqual(report_tags.divide(100, 5), 20)
class BarcodeTagTest(TestCase):
"""Unit tests for the barcode template tags"""