Skip to content

Commit

Permalink
[FIX] fixed used schemas + api address
Browse files Browse the repository at this point in the history
  • Loading branch information
benwillig committed Jun 4, 2024
1 parent ec6065d commit 3d901bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions shopinvader_api_address_shipping_note/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo.addons.shopinvader_api_address.schemas import (
ShippingAddressCreate,
ShippingAddressUpdate,
DeliveryAddressCreate,
DeliveryAddressUpdate,
)
from odoo.addons.shopinvader_schema_address.schemas import ShippingAddress
from odoo.addons.shopinvader_schema_address.schemas import DeliveryAddress


class ShippingAddressNote(ShippingAddress, extends=ShippingAddress):
class ShippingAddressNote(DeliveryAddress, extends=DeliveryAddress):
"""
Shipping Address
"""
Expand All @@ -23,7 +23,7 @@ def from_res_partner(cls, odoo_rec):
return res


class ShippingAddressNoteCreate(ShippingAddressCreate, extends=ShippingAddressCreate):
class ShippingAddressNoteCreate(DeliveryAddressCreate, extends=DeliveryAddressCreate):
"""
Creation of Shipping Address
"""
Expand All @@ -38,7 +38,7 @@ def to_res_partner_vals(self) -> dict:
return vals


class ShippingAddressNoteUpdate(ShippingAddressUpdate, extends=ShippingAddressUpdate):
class ShippingAddressNoteUpdate(DeliveryAddressUpdate, extends=DeliveryAddressUpdate):
"""
Update of Shipping Address
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_get_shipping_address(self):

with self._create_test_client(router=address_router) as test_client:
response: Response = test_client.get(
"/addresses/shipping",
"/addresses/delivery",
)

self.assertEqual(
Expand Down Expand Up @@ -83,7 +83,7 @@ def test_get_shipping_address(self):

with self._create_test_client(router=address_router) as test_client:
response: Response = test_client.get(
"/addresses/shipping",
"/addresses/delivery",
)

self.assertEqual(
Expand Down Expand Up @@ -120,7 +120,7 @@ def test_create_shipping_address(self):

with self._create_test_client(router=address_router) as test_client:
response: Response = test_client.post(
"/addresses/shipping", content=json.dumps(data)
"/addresses/delivery", content=json.dumps(data)
)

self.assertEqual(
Expand Down

0 comments on commit 3d901bd

Please sign in to comment.