ignore controls that should not be reached in coverage

This commit is contained in:
Matthias 2022-02-13 05:50:19 +01:00
parent 7793a22a35
commit 42b4466897
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076
3 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ class BomItemTest(TestCase):
with self.assertRaises(django_exceptions.ValidationError): with self.assertRaises(django_exceptions.ValidationError):
# A validation error should be raised here # A validation error should be raised here
item = BomItem.objects.create(part=self.bob, sub_part=self.bob, quantity=7) item = BomItem.objects.create(part=self.bob, sub_part=self.bob, quantity=7)
item.clean() item.clean() # pragma: no cover
def test_integer_quantity(self): def test_integer_quantity(self):
""" """

View File

@ -127,7 +127,7 @@ class CategoryTest(TestCase):
with self.assertRaises(ValidationError) as err: with self.assertRaises(ValidationError) as err:
cat.full_clean() cat.full_clean()
cat.save() cat.save() # pragma: no cover
self.assertIn('Illegal character in name', str(err.exception.error_dict.get('name'))) self.assertIn('Illegal character in name', str(err.exception.error_dict.get('name')))

View File

@ -44,7 +44,7 @@ class TestParams(TestCase):
with self.assertRaises(django_exceptions.ValidationError): with self.assertRaises(django_exceptions.ValidationError):
t3 = PartParameterTemplate(name='aBcde', units='dd') t3 = PartParameterTemplate(name='aBcde', units='dd')
t3.full_clean() t3.full_clean()
t3.save() t3.save() # pragma: no cover
class TestCategoryTemplates(TransactionTestCase): class TestCategoryTemplates(TransactionTestCase):