|
25 | 25 | from threading import RLock |
26 | 26 |
|
27 | 27 | import pytest |
28 | | -import urllib |
| 28 | +import warnings |
29 | 29 |
|
30 | | -from neo4j import ( |
31 | | - GraphDatabase, |
32 | | -) |
33 | | -from neo4j.exceptions import ServiceUnavailable |
| 30 | +from neo4j import GraphDatabase |
34 | 31 | from neo4j._exceptions import BoltHandshakeError |
| 32 | +from neo4j.exceptions import ServiceUnavailable |
35 | 33 | from neo4j.io import Bolt |
36 | 34 |
|
37 | 35 | # import logging |
@@ -76,7 +74,9 @@ def __init__(self, name=None, image=None, auth=None, |
76 | 74 | n_cores=None, n_replicas=None, |
77 | 75 | bolt_port=None, http_port=None, debug_port=None, |
78 | 76 | debug_suspend=None, dir_spec=None, config=None): |
79 | | - from boltkit.legacy.controller import _install, create_controller |
| 77 | + with warnings.catch_warnings(): |
| 78 | + warnings.simplefilter("ignore", ImportWarning) |
| 79 | + from boltkit.legacy.controller import _install, create_controller |
80 | 80 | assert image.endswith("-enterprise") |
81 | 81 | release = image[:-11] |
82 | 82 | if release == "snapshot": |
@@ -189,7 +189,9 @@ def service(request): |
189 | 189 | if existing_service: |
190 | 190 | NEO4J_SERVICE = existing_service |
191 | 191 | else: |
192 | | - NEO4J_SERVICE = Neo4jService(auth=NEO4J_AUTH, image=request.param, n_cores=NEO4J_CORES, n_replicas=NEO4J_REPLICAS) |
| 192 | + with warnings.catch_warnings(): |
| 193 | + warnings.simplefilter("ignore", DeprecationWarning) |
| 194 | + NEO4J_SERVICE = Neo4jService(auth=NEO4J_AUTH, image=request.param, n_cores=NEO4J_CORES, n_replicas=NEO4J_REPLICAS) |
193 | 195 | NEO4J_SERVICE.start(timeout=300) |
194 | 196 | yield NEO4J_SERVICE |
195 | 197 | if NEO4J_SERVICE is not None: |
|
0 commit comments