bcgov / bcgov/entity

BE - nested_session hides exceptions for unit tests

Open
#20,197 2 comments 0 reactions 0 assignees View on GitHub
Entities - Data Migration
Dominant language
JavaScript
Stars
23
Forks
62
Avg merge
24m
Merged PRs (30d)
1

Description

[`nested_session()`](https://github.com/bcgov/lear/blob/feature-legal-name/legal-api/tests/unit/__init__.py#L41) is currently used in unit test at BE (legal-api, filer, emailer etc.). It ignores exception as a result real test logic can be skipped and problems can be hidden.

**Example (Legal API)**
- wrong version
mandatory field `start_date` is missing and it returns as success before the following real test logic is executed
image.png

- correct version
image.png

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.