Run a test only if the client is connected to a cluster that supports secondary read preference
(self)
| 580 | return False |
| 581 | |
| 582 | def require_secondary_read_pref(self): |
| 583 | """Run a test only if the client is connected to a cluster that |
| 584 | supports secondary read preference |
| 585 | """ |
| 586 | return self._require( |
| 587 | lambda: self.supports_secondary_read_pref, |
| 588 | "This cluster does not support secondary read preference", |
| 589 | ) |
| 590 | |
| 591 | def require_no_replica_set(self, func): |
| 592 | """Run a test if the client is *not* connected to a replica set.""" |