Skip to content

Commit f5b102a

Browse files
PYTHON-4525 Transition the existing test_database.py test to be asynchronous (mongodb#1716)
1 parent cfa215c commit f5b102a

File tree

5 files changed

+857
-44
lines changed

5 files changed

+857
-44
lines changed

test/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,12 @@ def require_no_auth(self, func):
552552
func=func,
553553
)
554554

555+
def require_no_fips(self, func):
556+
"""Run a test only if the host does not have FIPS enabled."""
557+
return self._require(
558+
lambda: not self.fips_enabled, "Test cannot run on a FIPS-enabled host", func=func
559+
)
560+
555561
def require_replica_set(self, func):
556562
"""Run a test only if the client is connected to a replica set."""
557563
return self._require(lambda: self.is_rs, "Not connected to a replica set", func=func)

test/asynchronous/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,12 @@ def require_no_auth(self, func):
554554
func=func,
555555
)
556556

557+
def require_no_fips(self, func):
558+
"""Run a test only if the host does not have FIPS enabled."""
559+
return self._require(
560+
lambda: not self.fips_enabled, "Test cannot run on a FIPS-enabled host", func=func
561+
)
562+
557563
def require_replica_set(self, func):
558564
"""Run a test only if the client is connected to a replica set."""
559565
return self._require(lambda: self.is_rs, "Not connected to a replica set", func=func)

0 commit comments

Comments
 (0)