Socket
Socket
Sign inDemoInstall

matchmock

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

matchmock

Hamcrest matchers for mock objects.


Maintainers
1

matchmock

PyPI Version Build Status Coverage Status

Hamcrest matchers for mock objects.

Starting from version 2.0.0 python2 is no longer supported the 1.x series will remain supported but no new features will be added.

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 times
  • not_called - match mock that was never called
  • called_once - match mock that was called once regardless of arguments
  • called_with - match mock has at least one call with the specified arguments
  • called_once_with - match mock that was called once and with the specified arguments
  • called_n_times - match mock that was called number of times.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc