File: test_deprecated.py

package info (click to toggle)
python-graphene 3.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,120 kB
  • sloc: python: 8,935; makefile: 214; sh: 18
file content (9 lines) | stat: -rw-r--r-- 267 bytes parent folder | download
1
2
3
4
5
6
7
8
9
from .. import deprecated
from ..deprecated import warn_deprecation


def test_warn_deprecation(mocker):
    mocker.patch.object(deprecated, "warn")

    warn_deprecation("OH!")
    deprecated.warn.assert_called_with("OH!", stacklevel=2, category=DeprecationWarning)