Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes mock package dependency #1306

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tests/cross_agent/test_docker_container_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import json
import os

import mock
import pytest

import newrelic.common.utilization as u
Expand Down Expand Up @@ -43,7 +42,7 @@ def _mock_open(filename, mode):
raise FileNotFoundError
elif filename == "/proc/self/cgroup":
return mock_file
raise RuntimeError
raise RuntimeError()

return _mock_open

Expand Down
3 changes: 1 addition & 2 deletions tests/cross_agent/test_docker_container_id_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import json
import os

import mock
import pytest

import newrelic.common.utilization as u
Expand Down Expand Up @@ -43,7 +42,7 @@ def _mock_open(filename, mode):
raise FileNotFoundError
elif filename == "/proc/self/mountinfo":
return mock_file
raise RuntimeError
raise RuntimeError()

return _mock_open

Expand Down
2 changes: 1 addition & 1 deletion tests/mlmodel_langchain/test_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from langchain.chains.combine_documents import create_stuff_documents_chain
from langchain.chains.openai_functions import create_structured_output_chain, create_structured_output_runnable
from langchain_community.vectorstores.faiss import FAISS
from mock import patch
from unittest.mock import patch
from testing_support.fixtures import reset_core_stats_engine, validate_attributes
from testing_support.ml_testing_utils import (
disabled_ai_monitoring_record_content_settings,
Expand Down
2 changes: 1 addition & 1 deletion tests/mlmodel_langchain/test_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import pydantic_core
import pytest
from langchain.tools import tool
from mock import patch
from unittest.mock import patch
from testing_support.fixtures import reset_core_stats_engine, validate_attributes
from testing_support.ml_testing_utils import (
disabled_ai_monitoring_record_content_settings,
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ deps =
component_tastypie-tastypielatest: django<4.1
component_tastypie-tastypielatest: asgiref<3.7.1 # asgiref==3.7.1 only suppport Python 3.10+
coroutines_asyncio-{py37,py38,py39,py310,py311,py312,py313}: uvloop
cross_agent: mock==1.0.1
cross_agent: requests
datastore_asyncpg: asyncpg
datastore_aiomcache: aiomcache
Expand Down