| src/api/__init__.py |
(no function) |
0 |
0 |
0 |
100% |
| src/api/admin.py |
(no function) |
22 |
0 |
0 |
100% |
| src/api/apps.py |
ApiConfig.ready |
18 |
5 |
0 |
72% |
| src/api/apps.py |
(no function) |
9 |
0 |
0 |
100% |
| src/api/models.py |
ParkingLot.__str__ |
1 |
0 |
0 |
100% |
| src/api/models.py |
Spot.__str__ |
1 |
0 |
0 |
100% |
| src/api/models.py |
Booking.check_cancellable_error |
5 |
1 |
0 |
80% |
| src/api/models.py |
OperatorProfile.__str__ |
1 |
0 |
0 |
100% |
| src/api/models.py |
(no function) |
34 |
0 |
0 |
100% |
| src/api/permissions.py |
IsLotOperator.has_permission |
16 |
3 |
0 |
81% |
| src/api/permissions.py |
IsLotOperator.has_object_permission |
12 |
5 |
0 |
58% |
| src/api/permissions.py |
(no function) |
6 |
0 |
0 |
100% |
| src/api/serializers.py |
SpotSerializer.get_created_by |
1 |
1 |
0 |
0% |
| src/api/serializers.py |
SpotSerializer.validate |
10 |
3 |
0 |
70% |
| src/api/serializers.py |
ParkingLotDetailSerializer.validate_name |
3 |
0 |
0 |
100% |
| src/api/serializers.py |
ParkingLotDetailSerializer.validate_city |
4 |
0 |
0 |
100% |
| src/api/serializers.py |
ParkingLotDetailSerializer.validate_street |
3 |
0 |
0 |
100% |
| src/api/serializers.py |
ParkingLotDetailSerializer.validate_building |
3 |
0 |
0 |
100% |
| src/api/serializers.py |
UserRegistrationSerializer.create |
2 |
2 |
0 |
0% |
| src/api/serializers.py |
UserRegistrationSerializer.create |
2 |
0 |
0 |
100% |
| src/api/serializers.py |
UserSerializer.get_is_operator |
1 |
0 |
0 |
100% |
| src/api/serializers.py |
UserSerializer.get_lot_id |
3 |
0 |
0 |
100% |
| src/api/serializers.py |
SpotOperatorUpdateSerializer.validate |
3 |
0 |
0 |
100% |
| src/api/serializers.py |
OperatorAssignSerializer.validate_lot_id |
3 |
1 |
0 |
67% |
| src/api/serializers.py |
(no function) |
77 |
0 |
0 |
100% |
| src/api/services.py |
PaymentService.calculate_price |
4 |
0 |
0 |
100% |
| src/api/services.py |
PaymentService.initiate_payment |
10 |
1 |
0 |
90% |
| src/api/services.py |
PaymentService.process_refund |
2 |
0 |
0 |
100% |
| src/api/services.py |
PaymentService.verify_payment |
2 |
0 |
0 |
100% |
| src/api/services.py |
BookingNotificationService.send_booking_confirmation |
1 |
1 |
0 |
0% |
| src/api/services.py |
BookingNotificationService.send_cancellation_confirmation |
4 |
2 |
0 |
50% |
| src/api/services.py |
BookingNotificationService.send_reminder |
1 |
1 |
0 |
0% |
| src/api/services.py |
CancellationService.get_operator_cancellation_reason |
1 |
0 |
0 |
100% |
| src/api/services.py |
SpotUpdateService.update_spot |
4 |
0 |
0 |
100% |
| src/api/services.py |
(no function) |
30 |
0 |
0 |
100% |
| src/api/swagger.py |
(no function) |
6 |
0 |
0 |
100% |
| src/api/tests/__init__.py |
(no function) |
0 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_make_other_user_admin |
9 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_remove_admin_role |
9 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_assign_operator_to_lot |
11 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_remove_operator |
11 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_create_and_delete_parking_lot |
8 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_view_own_profile |
7 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_update_own_profile |
6 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_non_admin_cannot_see_admin_status |
6 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_create_parking_lot |
6 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_non_admin_cannot_create_parking_lot |
5 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_update_parking_lot_details |
8 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_delete_empty_parking_lot |
7 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_cannot_delete_lot_with_active_bookings |
10 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_view_all_parking_lots |
8 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_create_spot_in_any_lot |
7 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_view_all_spots_in_lot |
10 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_delete_spot |
8 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_assign_user_as_operator |
7 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_remove_operator_role |
9 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_operator_can_only_manage_assigned_lot |
9 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_view_all_bookings |
12 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_can_view_specific_booking |
10 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_must_provide_valid_lot_data |
5 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_admin_cannot_create_duplicate_spot_number |
7 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_unauthenticated_user_cannot_create_lot |
3 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_regular_user_can_view_public_lots |
7 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_regular_user_cannot_delete_spots |
7 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_deleting_lot_cascades_to_spots |
7 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
test_deleting_user_cascades_to_operator_profile |
6 |
0 |
0 |
100% |
| src/api/tests/test_admin.py |
(no function) |
65 |
0 |
0 |
100% |
| src/api/tests/test_models.py |
BookingTests.setUp |
6 |
6 |
0 |
0% |
| src/api/tests/test_models.py |
test_create_parking_lot_success |
4 |
0 |
0 |
100% |
| src/api/tests/test_models.py |
test_parking_lot_str_without_building |
5 |
0 |
0 |
100% |
| src/api/tests/test_models.py |
test_spot_creation_and_str |
5 |
0 |
0 |
100% |
| src/api/tests/test_models.py |
test_spot_unique_together_same_lot |
4 |
0 |
0 |
100% |
| src/api/tests/test_models.py |
test_spot_number_can_repeat_in_different_lots |
6 |
0 |
0 |
100% |
| src/api/tests/test_models.py |
test_booking_creation_defaults |
7 |
0 |
0 |
100% |
| src/api/tests/test_models.py |
test_booking_with_user_relationship |
7 |
0 |
0 |
100% |
| src/api/tests/test_models.py |
test_booking_has_index_fields |
2 |
0 |
0 |
100% |
| src/api/tests/test_models.py |
test_operator_profile_str_and_relation |
7 |
0 |
0 |
100% |
| src/api/tests/test_models.py |
test_operator_profile_without_lot |
4 |
0 |
0 |
100% |
| src/api/tests/test_models.py |
test_operator_profile_user_must_be_unique_fails |
5 |
0 |
0 |
100% |
| src/api/tests/test_models.py |
(no function) |
36 |
0 |
0 |
100% |
| src/api/tests/test_permissions.py |
test_permission_allows_own_lot |
9 |
0 |
0 |
100% |
| src/api/tests/test_permissions.py |
test_permission_denies_other_lot |
10 |
0 |
0 |
100% |
| src/api/tests/test_permissions.py |
test_has_permission_for_non_operator |
5 |
0 |
0 |
100% |
| src/api/tests/test_permissions.py |
test_object_permission_same_lot |
9 |
0 |
0 |
100% |
| src/api/tests/test_permissions.py |
test_object_permission_different_lot_denied |
10 |
0 |
0 |
100% |
| src/api/tests/test_permissions.py |
test_permission_denied_for_anonymous |
4 |
0 |
0 |
100% |
| src/api/tests/test_permissions.py |
test_operator_cannot_cancel_already_cancelled_booking |
13 |
0 |
0 |
100% |
| src/api/tests/test_permissions.py |
test_operator_cannot_cancel_past_booking |
14 |
0 |
0 |
100% |
| src/api/tests/test_permissions.py |
(no function) |
29 |
0 |
0 |
100% |
| src/api/tests/test_serializers.py |
test_invalid_fields_raise_error |
5 |
0 |
0 |
100% |
| src/api/tests/test_serializers.py |
test_valid_parking_lot_serializer |
3 |
0 |
0 |
100% |
| src/api/tests/test_serializers.py |
test_user_registration_serializer_creates_user |
7 |
0 |
0 |
100% |
| src/api/tests/test_serializers.py |
(no function) |
9 |
0 |
0 |
100% |
| src/api/tests/test_services.py |
test_calculate_price_correct |
5 |
0 |
0 |
100% |
| src/api/tests/test_services.py |
test_process_refund_returns_mock |
6 |
0 |
0 |
100% |
| src/api/tests/test_services.py |
test_verify_payment_always_returns_true |
1 |
0 |
0 |
100% |
| src/api/tests/test_services.py |
(no function) |
10 |
0 |
0 |
100% |
| src/api/tests/test_spot_creation.py |
TestSpotCreation.setup_method |
6 |
0 |
0 |
100% |
| src/api/tests/test_spot_creation.py |
TestSpotCreation.test_operator_creates_spot_in_own_lot_201 |
7 |
0 |
0 |
100% |
| src/api/tests/test_spot_creation.py |
TestSpotCreation.test_operator_cannot_create_duplicate_spot_number_400 |
8 |
0 |
0 |
100% |
| src/api/tests/test_spot_creation.py |
TestSpotCreation.test_operator_cannot_create_spot_in_other_lot |
6 |
0 |
0 |
100% |
| src/api/tests/test_spot_creation.py |
TestSpotCreation.test_non_operator_cannot_create_spot |
6 |
0 |
0 |
100% |
| src/api/tests/test_spot_creation.py |
TestSpotCreation.test_operator_cannot_create_spot_with_empty_number |
6 |
0 |
0 |
100% |
| src/api/tests/test_spot_creation.py |
TestSpotCreation.test_operator_cannot_create_spot_with_same_number_different_case |
9 |
0 |
0 |
100% |
| src/api/tests/test_spot_creation.py |
(no function) |
15 |
0 |
0 |
100% |
| src/api/tests/test_validators.py |
test_valid_booking_window_passes |
3 |
0 |
0 |
100% |
| src/api/tests/test_validators.py |
test_start_after_end_raises |
4 |
0 |
0 |
100% |
| src/api/tests/test_validators.py |
test_start_in_past_raises |
4 |
0 |
0 |
100% |
| src/api/tests/test_validators.py |
test_zero_duration_raises_error |
4 |
0 |
0 |
100% |
| src/api/tests/test_validators.py |
(no function) |
8 |
0 |
0 |
100% |
| src/api/tests/test_views.py |
test_operator_cancels_booking_and_reason_is_detailed |
16 |
0 |
0 |
100% |
| src/api/tests/test_views.py |
test_operator_can_patch_own_spot |
11 |
0 |
0 |
100% |
| src/api/tests/test_views.py |
test_parking_lot_list_and_detail |
8 |
0 |
0 |
100% |
| src/api/tests/test_views.py |
test_create_and_cancel_booking |
13 |
0 |
0 |
100% |
| src/api/tests/test_views.py |
test_user_register_and_update_me |
8 |
0 |
0 |
100% |
| src/api/tests/test_views.py |
test_operator_cannot_change_spot_number |
14 |
0 |
0 |
100% |
| src/api/tests/test_views.py |
test_operator_cannot_patch_spot_from_other_lot |
12 |
0 |
0 |
100% |
| src/api/tests/test_views.py |
test_list_spots_performance |
9 |
0 |
0 |
100% |
| src/api/tests/test_views.py |
test_delete_nonexistent_spot_returns_404 |
5 |
0 |
0 |
100% |
| src/api/tests/test_views.py |
test_spot_list_loads_under_half_second |
8 |
0 |
0 |
100% |
| src/api/tests/test_views.py |
test_operator_can_update_own_spot |
9 |
0 |
0 |
100% |
| src/api/tests/test_views.py |
test_operator_cannot_update_other_lot_spot |
10 |
0 |
0 |
100% |
| src/api/tests/test_views.py |
(no function) |
33 |
0 |
0 |
100% |
| src/api/urls.py |
(no function) |
9 |
0 |
0 |
100% |
| src/api/validators.py |
validate_booking_window |
4 |
0 |
0 |
100% |
| src/api/validators.py |
(no function) |
3 |
0 |
0 |
100% |
| src/api/views.py |
ParkingLotViewSet.get_serializer_class |
3 |
0 |
0 |
100% |
| src/api/views.py |
ParkingLotViewSet.get_permissions |
4 |
0 |
0 |
100% |
| src/api/views.py |
ParkingLotViewSet.create |
1 |
0 |
0 |
100% |
| src/api/views.py |
ParkingLotViewSet.update |
1 |
0 |
0 |
100% |
| src/api/views.py |
ParkingLotViewSet.partial_update |
1 |
0 |
0 |
100% |
| src/api/views.py |
ParkingLotViewSet.destroy |
1 |
0 |
0 |
100% |
| src/api/views.py |
ParkingLotViewSet.perform_destroy |
7 |
2 |
0 |
71% |
| src/api/views.py |
ParkingLotViewSet.list |
1 |
0 |
0 |
100% |
| src/api/views.py |
ParkingLotViewSet.retrieve |
1 |
0 |
0 |
100% |
| src/api/views.py |
SpotViewSet.get_queryset |
2 |
0 |
0 |
100% |
| src/api/views.py |
SpotViewSet.get_permissions |
4 |
0 |
0 |
100% |
| src/api/views.py |
SpotViewSet.list |
22 |
10 |
0 |
55% |
| src/api/views.py |
SpotViewSet.list.parse_bool |
6 |
4 |
0 |
33% |
| src/api/views.py |
SpotViewSet.retrieve |
1 |
1 |
0 |
0% |
| src/api/views.py |
SpotViewSet.create_spot |
14 |
1 |
0 |
93% |
| src/api/views.py |
SpotViewSet.operator_update |
5 |
0 |
0 |
100% |
| src/api/views.py |
SpotViewSet.destroy |
1 |
0 |
0 |
100% |
| src/api/views.py |
SpotViewSet.perform_destroy |
7 |
3 |
0 |
57% |
| src/api/views.py |
BookingViewSet.get_queryset |
6 |
1 |
0 |
83% |
| src/api/views.py |
BookingViewSet.get_object |
3 |
0 |
0 |
100% |
| src/api/views.py |
BookingViewSet.list |
8 |
2 |
0 |
75% |
| src/api/views.py |
BookingViewSet.retrieve |
1 |
0 |
0 |
100% |
| src/api/views.py |
BookingViewSet.create_booking |
14 |
1 |
0 |
93% |
| src/api/views.py |
BookingViewSet.cancel |
11 |
1 |
0 |
91% |
| src/api/views.py |
BookingViewSet.my_lot_bookings |
18 |
18 |
0 |
0% |
| src/api/views.py |
BookingViewSet.cancel_by_operator |
19 |
2 |
0 |
89% |
| src/api/views.py |
UserViewSet.get_permissions |
5 |
0 |
0 |
100% |
| src/api/views.py |
UserViewSet.get_serializer_class |
9 |
0 |
0 |
100% |
| src/api/views.py |
UserViewSet.register |
5 |
0 |
0 |
100% |
| src/api/views.py |
UserViewSet.me |
12 |
1 |
0 |
92% |
| src/api/views.py |
UserViewSet.retrieve |
1 |
1 |
0 |
0% |
| src/api/views.py |
UserViewSet.make_admin |
11 |
2 |
0 |
82% |
| src/api/views.py |
UserViewSet.remove_admin |
7 |
1 |
0 |
86% |
| src/api/views.py |
UserViewSet.make_operator |
9 |
1 |
0 |
89% |
| src/api/views.py |
UserViewSet.remove_operator |
6 |
1 |
0 |
83% |
| src/api/views.py |
(no function) |
108 |
0 |
0 |
100% |