Skip to content

Commit b73ea4f

Browse files
committed
[FIX] unit tests styling
1 parent 921ebe0 commit b73ea4f

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

estate/models/estate_property.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ def _check_selling_price(self):
7474
self.env._("The selling price cannot be lower than 90% of the expected price! Check your offers or adjust the expected price.")
7575
)
7676

77-
7877
@api.depends('living_area', 'garden_area')
7978
def _compute_total_area(self):
8079
for record in self:

estate/tests/test_estate_property.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
from odoo.tests.common import TransactionCase
2-
from odoo.exceptions import UserError, ValidationError
2+
from odoo.exceptions import UserError
33

44

55
class EstatePropertyCommon(TransactionCase):
66
@classmethod
77
def setUpClass(cls):
8-
super(EstatePropertyCommon, cls).setUpClass()
8+
super().setUpClass()
99

10-
cls.property = cls.env['estate.property'].create({'name': "Test Property",'expected_price': 1.0})
10+
cls.property = cls.env['estate.property'].create({'name': "Test Property", 'expected_price': 1.0})
1111

1212
def test_01_prevent_offer_for_sold_property(self):
1313
"""Test that creating an offer for a sold property raises a UserError."""
1414

15-
offer = self.env['estate.property.offer'].create({'property_id': self.property.id,'price': 2.0})
15+
offer = self.env['estate.property.offer'].create({'property_id': self.property.id, 'price': 2.0})
1616
offer.action_accept()
1717

1818
self.property.action_sell()
1919

2020
with self.assertRaises(UserError):
21-
self.env['estate.property.offer'].create({'property_id': self.property.id,'price': 3.0})
21+
self.env['estate.property.offer'].create({'property_id': self.property.id, 'price': 3.0})
2222

2323
def test_02_prevent_sell_no_accepted_offers(self):
2424
"""Test that selling a property without an accepted offer raises a UserError."""

0 commit comments

Comments
 (0)