Skip to content

Commit

Permalink
[RFC] tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RPSJR committed Nov 24, 2023
1 parent cc7a598 commit e449aa4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions fleet_vehicle_ownership/tests/test_fleet_vehicle_owner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -56,15 +56,14 @@ 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"],
"Incorrect domain when multiple vehicles",
)

# 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"],
Expand Down

0 comments on commit e449aa4

Please sign in to comment.