HEPCloud / decisionengine

HEPCloud Decision Engine framework
Apache License 2.0
6 stars 25 forks source link

Create Redis mock for unit tests #703

Closed shreyb closed 2 months ago

shreyb commented 2 months ago

This PR has two changes:

  1. Establishes a new pytest mark, unit, to be used for unit tests
  2. Changes in src/decisionengine/framework/engine/tests/test_verify_redis_server.py as a model for other test files a. Mark the appropriate tests as unit tests; b. Where possible, mock out external dependencies (like the redis.Redis.ping() method returning True or throwing an exception, so more tests are true unit tests. c. For the one integration test in this file, run it only if a redis server is actually running. Otherwise skip it.