Skip to content

Commit 91fecbf

Browse files
TimPansinolrafeeihmstepanekumaannamalaiNayuken
authored
Add PyMongo v4 Testing (#540)
* Add pymongo v4 testing * Add parameterized testing for mongo v3/v4 Co-authored-by: Lalleh Rafeei <[email protected]> Co-authored-by: Hannah Stepanek <[email protected]> Co-authored-by: Uma Annamalai <[email protected]> Co-authored-by: Nyenty Ayuk <[email protected]> * Fix linting issues. * [Mega-Linter] Apply linters fixes * Add suggestions from code review * [Mega-Linter] Apply linters fixes * Bump Tests * Fix py2 transaction name * [Mega-Linter] Apply linters fixes * Bump Tests Co-authored-by: Lalleh Rafeei <[email protected]> Co-authored-by: Hannah Stepanek <[email protected]> Co-authored-by: Uma Annamalai <[email protected]> Co-authored-by: Nyenty Ayuk <[email protected]> Co-authored-by: TimPansino <[email protected]>
1 parent e4c5f97 commit 91fecbf

File tree

3 files changed

+257
-169
lines changed

3 files changed

+257
-169
lines changed

tests/datastore_pymongo/conftest.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,28 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
import pytest
16-
17-
from testing_support.fixtures import (code_coverage_fixture,
18-
collector_agent_registration_fixture, collector_available_fixture)
15+
from testing_support.fixtures import ( # noqa: F401; pylint: disable=W0611
16+
code_coverage_fixture,
17+
collector_agent_registration_fixture,
18+
collector_available_fixture,
19+
)
1920

2021
_coverage_source = [
21-
'newrelic.hooks.datastore_pymongo',
22+
"newrelic.hooks.datastore_pymongo",
2223
]
2324

2425
code_coverage = code_coverage_fixture(source=_coverage_source)
2526

2627
_default_settings = {
27-
'transaction_tracer.explain_threshold': 0.0,
28-
'transaction_tracer.transaction_threshold': 0.0,
29-
'transaction_tracer.stack_trace_threshold': 0.0,
30-
'debug.log_data_collector_payloads': True,
31-
'debug.record_transaction_failure': True
28+
"transaction_tracer.explain_threshold": 0.0,
29+
"transaction_tracer.transaction_threshold": 0.0,
30+
"transaction_tracer.stack_trace_threshold": 0.0,
31+
"debug.log_data_collector_payloads": True,
32+
"debug.record_transaction_failure": True,
3233
}
3334

3435
collector_agent_registration = collector_agent_registration_fixture(
35-
app_name='Python Agent Test (datastore_pymongo)',
36-
default_settings=_default_settings,
37-
linked_applications=['Python Agent Test (datastore)'])
36+
app_name="Python Agent Test (datastore_pymongo)",
37+
default_settings=_default_settings,
38+
linked_applications=["Python Agent Test (datastore)"],
39+
)

0 commit comments

Comments
 (0)