test : add unit tests for executor._row_value helper

Đang mở
#2,248 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

  • #2253 của @tmdeveloper007 — đã đóng, không merge

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
1/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
testing

Hướng nghiên cứu

Open testing/backend/unit/test_executor_helpers.py and locate the executor helper tests; read _row_value() to confirm its behavior. Add tests for the listed dictionary, missing-key, None, non-dictionary, and key coercion cases, then run the relevant unit tests. The issue says tmdeveloper007 is handling the work, and a linked pull request exists, so check their status before starting.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary of What Needs to be Done:
Add unit tests for executor._row_value() in testing/backend/unit/test_executor_helpers.py. This helper function is not directly tested despite being used in the task execution pipeline.

Changes that Need to be Made:
Add a new test class in testing/backend/unit/test_executor_helpers.py:

For _row_value(row, key, default=None):

  • returns the value when key exists in dict
  • returns default when key is absent
  • returns default when row is None
  • returns default when row is not a dict (e.g., None, list)
  • coercion: key as string works even if row has non-string keys (dict.get behavior)

Impact that it would Provide:

  • Ensures the task result parsing helpers handle malformed rows gracefully
  • Improves robustness of the scan result processing pipeline
  • Pure helper, fully mockable with no external dependencies

Note: This task is being handled by tmdeveloper007 — please assign to that account when picking it up.

Ngôn ngữ chính
Python
Star
36
Fork
234
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của utksh1/SecuScan

Tất cả issue của utksh1/SecuScan

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.