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 details)
Built Distribution
File details
Details for the file matchmock-1.0.0.tar.gz
.
File metadata
- Download URL: matchmock-1.0.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.1.3 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46d45a8214f4f90d306e7eea3588ff17d157dd426037ad7472ea6d8e4a3a1483 |
|
MD5 | d0a31646216da0696f6977ace8f67915 |
|
BLAKE2b-256 | cb2869343ddb2c14eb0812dfcb2f03e27f3598765a132997ac0bf555f79bdfc1 |
File details
Details for the file matchmock-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: matchmock-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.1.3 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e55a8f5dfa320e52f12360317d77ed396aea246b9ce2fc3e6b569909f4d9d94 |
|
MD5 | 9d9f887dda92927b3698eb0924d3641f |
|
BLAKE2b-256 | 9c898cf3173f2382c1a280a01fd5f036a22b911af5d672b037bc3f2492ed5d03 |