userver: testsuite.plugins.common.LoadJsonFixture Class Reference
Loading...
Searching...
No Matches
testsuite.plugins.common.LoadJsonFixture Class Reference

Detailed Description

Load json doc from static directory.

Json loader runs json_util.loads(data, ..., *args, **kwargs) hooks. It does:

  • bson.json_util.object_hook()
  • mockserver substitution

Example:

.. code-block:: python

def test_something(load_json):
    json_obj = load_json('filename.json')

Definition at line 149 of file common.py.

Inheritance diagram for testsuite.plugins.common.LoadJsonFixture:

Public Member Functions

typing.Any __call__ (self, types.PathOrStr filename, *args, missing_ok=False, missing=None, **kwargs)

Member Function Documentation

◆ __call__()

typing.Any testsuite.plugins.common.LoadJsonFixture.__call__ ( self,
types.PathOrStr filename,
* args,
missing_ok = False,
missing = None,
** kwargs )

Definition at line 165 of file common.py.


The documentation for this class was generated from the following file: