2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-14 19:15:41 +00:00

PEP fixes

This commit is contained in:
Oliver Walters
2019-04-25 03:20:25 +10:00
parent 7c91c9ba79
commit 7b68310d73
12 changed files with 47 additions and 68 deletions

View File

@ -1,7 +1,6 @@
from django.test import TestCase
from .models import Part, PartCategory
from .models import rename_part_image
class CategoryTest(TestCase):
@ -11,16 +10,16 @@ class CategoryTest(TestCase):
def setUp(self):
self.p1 = PartCategory.objects.create(name='A',
description='Most highest level',
parent=None)
description='Most highest level',
parent=None)
self.p2 = PartCategory.objects.create(name='B',
description='Sits under second',
parent=self.p1)
description='Sits under second',
parent=self.p1)
self.p3 = PartCategory.objects.create(name='C',
description='Third tier category',
parent=self.p2)
description='Third tier category',
parent=self.p2)
# Add two parts in p2
Part.objects.create(name='Flange', category=self.p2)
@ -64,4 +63,4 @@ class CategoryTest(TestCase):
self.assertEqual(self.p1.partcount, 3)
self.assertEqual(self.p2.partcount, 3)
self.assertEqual(self.p3.partcount, 1)
self.assertEqual(self.p3.partcount, 1)