File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1010from flask_mongoengine import MongoEngine , current_mongoengine_instance
1111
1212
13+ def is_mongo_mock_installed () -> bool :
14+ try :
15+ import mongomock .__version__ # noqa
16+ except ImportError :
17+ return False
18+ return True
19+
20+
1321def test_connection__should_use_defaults__if_no_settings_provided (app ):
1422 """Make sure a simple connection to a standalone MongoDB works."""
1523 db = MongoEngine ()
@@ -128,6 +136,9 @@ def test_connection__should_parse_host_uri__if_host_formatted_as_uri(
128136 assert connection .PORT == 27017
129137
130138
139+ @pytest .mark .skipif (
140+ is_mongo_mock_installed (), reason = "This test require mongomock not exist"
141+ )
131142@pytest .mark .parametrize (
132143 ("config_extension" ),
133144 [
You can’t perform that action at this time.
0 commit comments