
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Asserty is a utility package that provides methods for better assertion in testing.
The package can be installed using pip
:
$ pip install asserty
You make assertions by importing the assert_that
function from the asserty
package:
from asserty import assert_that
assert_that("str").not_equals("string")
assert_that(5).is_in(range(10))
def myfunc(arg):
if not isinstance(arg, str):
raise TypeError()
return arg+"yay"
assert_that(myfunc).if_called_with(1).raises(TypeError)
assert_that(myfunc).if_called_with("Hey-").returns("Hey-yay")
Outside a test context that does not handle AssertionError
you can import the equivalent function called that
:
from asserty import that
assert that("str").not_equals("string")
assert that(5).is_in(range(10))
FAQs
A utility package for making better test assertions
We found that asserty 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 Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.