跳转到主要内容

未提供项目描述

项目描述

Yellowbox

Test YellowBox Coverage

Yellowbox使将docker容器作为黑盒测试的一部分运行变得容易。

文档: https://yellowbox.readthedocs.io/


示例

假设你想对一个依赖于redis服务器的服务进行黑盒测试。

from yellowbox.clients import docker_client
from yellowbox.extras import RedisService


def test_black_box():
  with docker_client() as docker_client, RedisService.run(docker_client) as redis:
    redis_port = redis.client_port()  # this the host port the redis
    ...  # run your black box test here
  # yellowbox will automatically close the service when exiting the scope


def test_black_box_with_initial_data():
  # you can use the service's built-in utility functions to
  # easily interoperate the service
  with docker_client() as docker_client,
          RedisService.run(docker_client) as redis,
          redis.client() as client:
    client.set("foo", "bar")
  ...

许可证

Yellowbox注册在MIT公共许可证下

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

yellowbox-0.8.8.tar.gz (49.8 kB 查看哈希值)

上传时间:

构建分布

yellowbox-0.8.8-py3-none-any.whl (63.3 kB 查看哈希值)

上传时间: Python 3

由以下支持