Skip to content

Commit

Permalink
using strictredis
Browse files Browse the repository at this point in the history
  • Loading branch information
uhbrar committed Dec 8, 2023
1 parent fa7c3b4 commit 7715db1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ pytest-asyncio==0.15.1
pytest-dotenv==0.5.2
pyyaml==6.0
reasoner-pydantic==4.1.1
redis==4.3.4
redis~=3.5.3
requests==2.28.1
uvicorn==0.17.6
uvloop==0.17.0
opentelemetry-sdk==1.16.0
opentelemetry-instrumentation-fastapi==0.37b0
opentelemetry-exporter-jaeger==1.16.0
opentelemetry-instrumentation-httpx==0.37b0
fakeredis==2.10.2
fakeredis<=2.10.2
6 changes: 3 additions & 3 deletions tests/test_aragorn.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from fastapi.testclient import TestClient
import redis.asyncio
import redis
from src.server import APP
import os
import json
Expand Down Expand Up @@ -49,7 +49,7 @@ def xtest_async(mock_callback):


def test_aragorn_wf(monkeypatch):
monkeypatch.setattr(redis.asyncio, "Redis", redisMock)
monkeypatch.setattr(redis, "Redis", redisMock)
init_db()
workflow_A1("aragorn")

Expand Down Expand Up @@ -300,7 +300,7 @@ def x_test_standup_2():
assert found

def test_null_results(monkeypatch):
monkeypatch.setattr(redis.asyncio, "Redis", redisMock)
monkeypatch.setattr(redis, "Redis", redisMock)
init_db()
#make sure that aragorn can handle cases where results is null (as opposed to missing)
query= {
Expand Down
6 changes: 3 additions & 3 deletions tests/test_workflow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from fastapi.testclient import TestClient
import redis.asyncio
import redis
from src.server import APP as APP
from src import operations
import os
Expand All @@ -14,7 +14,7 @@
jsondir = 'InputJson_1.2'

def test_bad_ops(monkeypatch):
monkeypatch.setattr(redis.asyncio, "Redis", redisMock)
monkeypatch.setattr(redis, "Redis", redisMock)
# get the location of the test file
dir_path: str = os.path.dirname(os.path.realpath(__file__))
test_filename = os.path.join(dir_path, jsondir, 'workflow_422.json')
Expand All @@ -30,7 +30,7 @@ def test_bad_ops(monkeypatch):

def test_lookup_only(monkeypatch):
"""This has a workflow with a single op (lookup). So the result should not have scores"""
monkeypatch.setattr(redis.asyncio, "Redis", redisMock)
monkeypatch.setattr(redis, "Redis", redisMock)
init_db()
dir_path: str = os.path.dirname(os.path.realpath(__file__))
test_filename = os.path.join(dir_path, jsondir, 'workflow_200.json')
Expand Down

0 comments on commit 7715db1

Please sign in to comment.