diff --git a/delivery_partner_ups/__init__.py b/delivery_partner_ups/__init__.py index 0ee8b507..0650744f 100644 --- a/delivery_partner_ups/__init__.py +++ b/delivery_partner_ups/__init__.py @@ -1,2 +1 @@ from . import models -from . import tests diff --git a/delivery_partner_ups/__manifest__.py b/delivery_partner_ups/__manifest__.py index 4639f374..b9cff5ac 100755 --- a/delivery_partner_ups/__manifest__.py +++ b/delivery_partner_ups/__manifest__.py @@ -1,7 +1,7 @@ { 'name': 'UPS Partner Shipping Accounts', 'author': 'Hibou Corp. ', - 'version': '12.0.1.0.0', + 'version': '13.0.1.0.0', 'category': 'Stock', 'sequence': 95, 'summary': 'UPS Partner Shipping Accounts', diff --git a/delivery_partner_ups/tests/test_ups_account.py b/delivery_partner_ups/tests/test_ups_account.py index 6e133a20..f4391039 100644 --- a/delivery_partner_ups/tests/test_ups_account.py +++ b/delivery_partner_ups/tests/test_ups_account.py @@ -7,6 +7,7 @@ class TestAccount(TransactionCase): def setUp(self): super(TestAccount, self).setUp() self.PartnerShippingAccount = self.env['partner.shipping.account'] + self.partner = self.env.ref('base.res_partner_12') def test_ups_account_information(self): # Create object and confirm that validation error raises if ups account number is blank or not 8 digits @@ -14,7 +15,7 @@ class TestAccount(TransactionCase): wrong_account_number = self.PartnerShippingAccount.create({ 'name': '1234567', 'description': 'Error Account', - 'partner_id': 5, + 'partner_id': self.partner.id, 'delivery_type': 'ups', 'note': 'This is a note', 'ups_zip': '12345' @@ -24,7 +25,7 @@ class TestAccount(TransactionCase): no_account_number = self.PartnerShippingAccount.create({ 'name': '', 'description': 'Error Account', - 'partner_id': 5, + 'partner_id': self.partner.id, 'delivery_type': 'ups', 'note': 'This is a note', 'ups_zip': '12345' @@ -34,7 +35,7 @@ class TestAccount(TransactionCase): wrong_zip_code = self.PartnerShippingAccount.create({ 'name': '123456', 'description': 'Error Account', - 'partner_id': 5, + 'partner_id': self.partner.id, 'delivery_type': 'ups', 'note': 'This is a note', 'ups_zip': '1234' @@ -44,8 +45,17 @@ class TestAccount(TransactionCase): no_zip_code = self.PartnerShippingAccount.create({ 'name': '123456', 'description': 'Error Account', - 'partner_id': 5, + 'partner_id': self.partner.id, 'delivery_type': 'ups', 'note': 'This is a note', 'ups_zip': '' }) + + _ = self.PartnerShippingAccount.create({ + 'name': '123456', + 'description': 'Error Account', + 'partner_id': self.partner.id, + 'delivery_type': 'ups', + 'note': 'This is a note', + 'ups_zip': '12345' + })