mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 19:15:41 +00:00
PEP fixes
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user