    def test_Validator_is_valid_two_arguments(self):
        """
        As of v4.0.0, calling is_valid with two arguments (to provide a
        different schema) is deprecated.
        """

        validator = validators.Draft7Validator({})
        message = "Passing a schema to Validator.is_valid is deprecated "
        with self.assertWarnsRegex(DeprecationWarning, message) as w:
            result = validator.is_valid("foo", {"type": "number"})

        self.assertFalse(result)
        self.assertEqual(w.filename, __file__)
As of v4.0.0, calling is_valid with two arguments (to provide a
different schema) is deprecated.
jsonschema/tests/test_deprecations.py