Skip to main content

vedro-jj

Vedro Interactive

Codecov PyPI PyPI - Downloads Python Version

Installation

1. Install package

$ pip3 install vedro-jj

2. Enable plugin

# ./vedro.cfg.py
import vedro
import vedro_jj

class Config(vedro.Config):

    class Plugins(vedro.Config.Plugins):

        class RemoteMock(vedro_jj.RemoteMock):
            enabled = True

Usage

# ./scenarios/get_users.py
import jj
import vedro
from httpx import AsyncClient
from jj.mock import mocked

class Scenario(vedro.Scenario):
    subject = "get users"

    def given(self):
        self.mock_matcher = jj.match("GET", "/users")
        self.mock_response = jj.Response(json=[])

    async def when(self):
        async with mocked(self.mock_matcher, self.mock_response):
            async with AsyncClient() as client:
                self.response = await client.get("http://localhost:8080/users")

    def then(self):
        assert self.response.status_code == 200
        assert self.response.json() == []
$ vedro run -vv

Metadata

Release files for vedro-jj 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vedro-jj 0.0.1
File Size Uploaded
vedro-jj-0.0.1.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vedro-jj 0.0.1
File Interpreter ABI Platform
vedro_jj-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.2 kB

Release files / vedro-jj-0.0.1.tar.gz

Download URL vedro-jj-0.0.1.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3a8bc790c4669a69a821d24642878d0fe4d0218d401ac7de62674b0eb0c8b2b2
BLAKE2b-256 checksum
How to use checksums
f240f79cc37c003ed6000f1cd4d33fdc2adacdcb03418339711bf374475ac4e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

Release files / vedro_jj-0.0.1-py3-none-any.whl

Download URL vedro_jj-0.0.1-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0de49625e6d9865f3c0f95b451434df3c25cdfaf58dffc27b0f2cdd6bc10d14b
BLAKE2b-256 checksum
How to use checksums
ded5f40e6f948bda50cf95139255358acb9b53c17ec644b32aa18ac53ca21c50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/35.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

Release history Release notifications | RSS feed

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page