Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Highly customizable and expressive mocking library for Python.
Mockify is a library inspired by Google Mock C++ framework, but adopted to Python world.
Mockify is based on expectations that you need to record on your mocks before those are called by code you're testing. And expectations you're recording are basically assertions that must pass before test ends. Along with expectations you can also record actions the mock will execute once called. And all of these is provided by simple, expressive and easy to use API.
Here's a simple example:
from mockify.core import satisfied
from mockify.mock import Mock
from mockify.actions import Return
def func_caller(func):
return func()
def test_func_caller():
func_mock = Mock('greet')
func_mock.expect_call().will_once(Return('Hello, world!'))
with satisfied(func_mock):
assert func_caller(func_mock) == 'Hello, world!'
Mockify allows you to:
I hope you'll find this library useful.
Newest documentation can be found at https://mockify.readthedocs.org/.
Source code is available at https://github.com/mwiatrzyk/mockify.
This software is released under the terms of the MIT license.
FAQs
Highly customizable and expressive mocking library for Python.
We found that mockify demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.