Skip to main content

Validator for Vedro framework

Project description

Vedro Valera Validator

Codecov PyPI PyPI - Downloads Python Version


1. Install package

$ pip3 install vedro-valera-validator

2. Enable plugin

# ./
import vedro
import vedro_valera_validator as v

class Config(vedro.Config):

    class Plugins(vedro.Config.Plugins):

        class ValeraValidator(v.ValeraValidator):
            enabled = True


# ./scenarios/
import vedro
from base64 import b64decode
from d42 import schema

class Scenario(vedro.Scenario):
    subject = "decode base64 encoded string"

    def given(self):
        self.encoded = "Y3VjdW1iZXI="

    def when(self):
        self.result = {
            "result": b64decode(self.encoded)

    def then(self):
        assert self.result == schema.dict({
            "result": schema.bytes(b"banana")

Run tests

$ vedro run
 - Value <class 'bytes'> at _['result'] must be equal to b'banana', but b'cucumber' given

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vedro-valera-validator-1.0.1.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

vedro_valera_validator-1.0.1-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page