Skip to main content

Plugin to run Redis using the Hitch testing framework.

Project description

HitchRedis

HitchRedis is a plugin for the Hitch testing framework that lets you run and interact with Redis during your integration tests.

Use with Hitch

Install like so:

$ hitch install hitchredis
# Service definition in engine's setUp:
self.services['Redis'] = hitchredis.RedisService(
    version="2.8.4"                                     # Mandatory
    redis_exec="redis-server",                          # Optional (default: redis-server)
    redis_cli="redis-cli",                              # Optional (default: redis-cli)
    port=16379,                                         # Optional (default: 16379)
)

# Interact using the cli:
self.services['Redis'].cli("-n", "1", "get", "mypasswd").run()
[ prints mypasswd ]

See this service in action at the DjangoRemindMe project.

Features

  • Starts up on a separate thread in parallel with other services when running with HitchServe, so that your integration tests run faster.

  • Contains subcommand to interact with the CLI.

  • Run the server on whichever port you like.

  • Version must be set explicitly to prevent “works on my machine” screw ups caused by different versions of Redis being installed.

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

hitchredis-0.3.tar.gz (2.9 kB view hashes)

Uploaded Source

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