Hamcrest matchers for mock objects.
Project description
matchmock
Hamcrest matchers for mock objects.
Example
f = Mock()
f.method('foo', 'bar')
assert_that(f.method, called_once_with(anything(), 'bar')
Matchers
called
- match mock that was called one or more timesnot_called
- match mock that was never calledcalled_once
- match mock that was called once regardless of argumentscalled_with
- match mock has at least one call with the specified argumentscalled_once_with
- match mock that was called once and with the specified argumentscalled_n_times
- match mock that was called number of times.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
matchmock-1.0.0.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for matchmock-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e55a8f5dfa320e52f12360317d77ed396aea246b9ce2fc3e6b569909f4d9d94 |
|
MD5 | 9d9f887dda92927b3698eb0924d3641f |
|
BLAKE2b-256 | 9c898cf3173f2382c1a280a01fd5f036a22b911af5d672b037bc3f2492ed5d03 |