Skip to content

Commit

Permalink
Fixes for unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SchrodingersGat committed Jul 19, 2021
1 parent 893e942 commit bbc2ccc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion inventree/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import json


INVENTREE_PYTHON_VERSION = "0.2.4"
INVENTREE_PYTHON_VERSION = "0.3.1"


logger = logging.getLogger('inventree')
Expand Down
10 changes: 8 additions & 2 deletions test/test_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,18 @@ def test_company_parts(self):
mpn = f"MPN_XYX-{i}_{c.pk}"
sku = f"SKU_ABC-{i}_{c.pk}"

# Create a new ManufacturerPart
m_part = company.ManufacturerPart.create(self.api, {
'part': 1,
'manufacturer': c.pk,
'MPN': mpn
})

# Creating a unique SupplierPart should also create a ManufacturerPart
company.SupplierPart.create(self.api, {
'supplier': c.pk,
'part': 1,
'manufacturer': c.pk,
'MPN': mpn,
'manufacturer_part': m_part.pk,
'SKU': sku,
})

Expand Down

0 comments on commit bbc2ccc

Please sign in to comment.