facebook / facebook/TestSlide

Suggest mock_(async)_callable from StrictMock

Open
#128 0 comments 0 reactions 0 assignees View on GitHub
Better Error Messages enhancement good first issue help wanted StrictMock
Dominant language
Python
Stars
149
Forks
62
PR merge metrics
No merged PRs in 30d

Description

StrictMock raises when an attribute is accessed, but has not been previously defined

https://github.com/facebookincubator/TestSlide/blob/8d516487247b6591c5a310c3e069ddb32d822d5f/testslide/strict_mock.py#L70

The message simply mentions "setting" the attribute. Let's improve this message to, if the mock has a template, and the attribute is callable, suggest using mock_callable / mock_async_callable to set it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.