mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 13:35:40 +00:00
PEP fixes
This commit is contained in:
@ -89,21 +89,21 @@ class EditBomItemForm(HelperForm):
|
||||
|
||||
class EditSupplierPartForm(HelperForm):
|
||||
|
||||
class Meta:
|
||||
model = SupplierPart
|
||||
fields = [
|
||||
'supplier',
|
||||
'SKU',
|
||||
'part',
|
||||
'description',
|
||||
'URL',
|
||||
'manufacturer',
|
||||
'MPN',
|
||||
'note',
|
||||
'single_price',
|
||||
'base_cost',
|
||||
'multiple',
|
||||
'minimum',
|
||||
'packaging',
|
||||
'lead_time'
|
||||
]
|
||||
class Meta:
|
||||
model = SupplierPart
|
||||
fields = [
|
||||
'supplier',
|
||||
'SKU',
|
||||
'part',
|
||||
'description',
|
||||
'URL',
|
||||
'manufacturer',
|
||||
'MPN',
|
||||
'note',
|
||||
'single_price',
|
||||
'base_cost',
|
||||
'multiple',
|
||||
'minimum',
|
||||
'packaging',
|
||||
'lead_time'
|
||||
]
|
||||
|
@ -1,10 +1,7 @@
|
||||
from django.test import TestCase
|
||||
|
||||
from .models import Part, BomItem
|
||||
|
||||
|
||||
class BomItemTest(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
@ -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)
|
||||
|
@ -2,6 +2,7 @@ from django.test import TestCase
|
||||
|
||||
from .models import Part, PartCategory
|
||||
|
||||
|
||||
class SimplePartTest(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
@ -19,4 +20,4 @@ class SimplePartTest(TestCase):
|
||||
|
||||
def test_category(self):
|
||||
self.assertEqual(self.px.category_path, '')
|
||||
self.assertEqual(self.pz.category_path, 'TLC')
|
||||
self.assertEqual(self.pz.category_path, 'TLC')
|
||||
|
@ -1,9 +1,7 @@
|
||||
from django.test import TestCase
|
||||
|
||||
from .models import Part, SupplierPart
|
||||
|
||||
|
||||
class SupplierPartTest(TestCase):
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
pass
|
||||
|
@ -70,23 +70,3 @@ part_urls = [
|
||||
# Top level part list (display top level parts and categories)
|
||||
url(r'^.*$', views.PartIndex.as_view(), name='part-index'),
|
||||
]
|
||||
|
||||
"""
|
||||
part_param_urls = [
|
||||
# Detail of a single part parameter
|
||||
url(r'^(?P<pk>[0-9]+)/?$', views.PartParamDetail.as_view(), name='partparameter-detail'),
|
||||
|
||||
# Parameters associated with a particular part
|
||||
url(r'^\?.*/?$', views.PartParamList.as_view()),
|
||||
url(r'^$', views.PartParamList.as_view()),
|
||||
]
|
||||
|
||||
part_param_template_urls = [
|
||||
# Detail of a single part field template
|
||||
url(r'^(?P<pk>[0-9]+)/?$', views.PartTemplateDetail.as_view(), name='partparametertemplate-detail'),
|
||||
|
||||
# List all part field templates
|
||||
url(r'^\?.*/?$', views.PartTemplateList.as_view()),
|
||||
url(r'^$', views.PartTemplateList.as_view())
|
||||
]
|
||||
"""
|
||||
|
Reference in New Issue
Block a user