From e449aa40ab0014d4e9e77f97c5f840689e417ff3 Mon Sep 17 00:00:00 2001 From: RPSJR Date: Fri, 24 Nov 2023 18:19:09 -0300 Subject: [PATCH] [RFC] tests --- fleet_vehicle_ownership/tests/test_fleet_vehicle_owner.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fleet_vehicle_ownership/tests/test_fleet_vehicle_owner.py b/fleet_vehicle_ownership/tests/test_fleet_vehicle_owner.py index 4edaaaef..87e73749 100644 --- a/fleet_vehicle_ownership/tests/test_fleet_vehicle_owner.py +++ b/fleet_vehicle_ownership/tests/test_fleet_vehicle_owner.py @@ -41,8 +41,8 @@ def setUp(self): ) def test_compute_vehicle_count(self): - # Check if the vehicle count is computed correctly - self.partner._compute_vehicle_count() + # Check if the vehicle count is computed correctly, + # test starts with test partner owing 2 vehucles self.assertEqual(self.partner.vehicle_count, 2, "Vehicle count is incorrect") def test_action_view_vehicles(self): @@ -56,7 +56,6 @@ def test_action_view_vehicles(self): self.assertEqual(action["name"], "Vehicles", "Incorrect name in action") # Test when there is more than one vehicle - self.partner.vehicle_count = 2 action = self.partner.action_view_vehicles() self.assertTrue( action["domain"], @@ -64,7 +63,7 @@ def test_action_view_vehicles(self): ) # Test when there is only one vehicle - self.partner.vehicle_count = 1 + self.vehicle2.owner_id = None action = self.partner.action_view_vehicles() self.assertEqual( action["views"],