Commit 3df7b50c authored by Jérome Perrin's avatar Jérome Perrin Committed by Kazuhiko Shiozaki

testInventoryAPI: verify warning with BBB quantity unit

parent 491c6a54
......@@ -36,6 +36,7 @@ import os
import random
import unittest
from unittest import expectedFailure
import warnings
from AccessControl.SecurityManagement import newSecurityManager
from DateTime import DateTime
......@@ -4189,7 +4190,14 @@ class TestUnitConversionBackwardCompatibility(BaseTestUnitConversion):
delivery.confirm()
delivery.start()
delivery.stop()
with warnings.catch_warnings(record=True) as catched_warnings:
self.tic()
self.assertIn(
'quantity field of quantity_unit categories is deprecated. '
'Please use Quantity Unit Conversion Definitions instead and '
'reset the value of this field.',
[str(w.message) for w in catched_warnings],
)
# inventories of that resource are indexed in grams
self.assertEqual(3010,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment