facebook/TestSlide

Suggest mock_(async)_callable from StrictMock

Open

#128 ouverte le 16 mars 2020

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)Python (58 forks)auto 404
Better Error MessagesStrictMockenhancementgood first issuehelp wanted

Métriques du dépôt

Stars
 (147 stars)
Métriques de merge PR
 (Métriques PR en attente)

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.

Guide contributeur