aboutsummaryrefslogtreecommitdiffstats
path: root/tests/base.py
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2019-11-14 10:50:49 +0100
committerGravatar Sebastiaan Zeeff <[email protected]>2019-11-14 10:50:49 +0100
commitccda39c5e42e94011c9c1bd14080d004d3d61f02 (patch)
tree7941fc0bb72a4de5cd8caf344e297252dbd96edb /tests/base.py
parentMerging in master (diff)
Add bot=False default value to MockMember
By default, a mocked value is considered `truthy` in Python, like all non-empty/non-zero/non-None values in Python. This means that if an attribute is not explicitly set on a mock, it will evaluate at as truthy in a boolean context, since the mock will provide a truthy mocked value by default. This is not the best default value for the `bot` attribute of our MockMember type, since members are rarely bots. It makes much more intuitive sense to me to consider a member to not be a bot, unless we explicitly set `bot=True`. This commit sets that sensible default value that can be overwritten by passing `bot=False` to the constructor or setting the `object.bot` attribute to `False` after the creation of the mock.
Diffstat (limited to 'tests/base.py')
0 files changed, 0 insertions, 0 deletions