Skip to content

Commit

Permalink
PYTHON-3526 Fix mockup tests (#1119)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneHarvey committed Nov 17, 2022
1 parent 3ab7390 commit b290f7b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 14 deletions.
3 changes: 1 addition & 2 deletions test/mockupdb/test_mixed_version_sharded.py
Expand Up @@ -19,11 +19,10 @@
from queue import Queue

from mockupdb import MockupDB, go
from operations import upgrades # type: ignore[import]

from pymongo import MongoClient

from .operations import upgrades


class TestMixedVersionSharded(unittest.TestCase):
def setup_server(self, upgrade):
Expand Down
3 changes: 1 addition & 2 deletions test/mockupdb/test_mongos_command_read_mode.py
Expand Up @@ -16,6 +16,7 @@
import unittest

from mockupdb import MockupDB, OpMsg, going
from operations import operations # type: ignore[import]

from pymongo import MongoClient, ReadPreference
from pymongo.read_preferences import (
Expand All @@ -24,8 +25,6 @@
read_pref_mode_from_name,
)

from .operations import operations


class TestMongosCommandReadMode(unittest.TestCase):
def test_aggregate(self):
Expand Down
3 changes: 1 addition & 2 deletions test/mockupdb/test_op_msg_read_preference.py
Expand Up @@ -18,6 +18,7 @@
from typing import Any

from mockupdb import CommandBase, MockupDB, going
from operations import operations # type: ignore[import]

from pymongo import MongoClient, ReadPreference
from pymongo.read_preferences import (
Expand All @@ -26,8 +27,6 @@
read_pref_mode_from_name,
)

from .operations import operations


class OpMsgReadPrefBase(unittest.TestCase):
single_mongod = False
Expand Down
3 changes: 1 addition & 2 deletions test/mockupdb/test_reset_and_request_check.py
Expand Up @@ -17,13 +17,12 @@
import unittest

from mockupdb import MockupDB, going, wait_until
from operations import operations # type: ignore[import]

from pymongo import MongoClient
from pymongo.errors import ConnectionFailure
from pymongo.server_type import SERVER_TYPE

from .operations import operations


class TestResetAndRequestCheck(unittest.TestCase):
def __init__(self, *args, **kwargs):
Expand Down
3 changes: 1 addition & 2 deletions test/mockupdb/test_slave_okay_rs.py
Expand Up @@ -20,11 +20,10 @@
import unittest

from mockupdb import MockupDB, going
from operations import operations # type: ignore[import]

from pymongo import MongoClient

from .operations import operations


class TestSlaveOkayRS(unittest.TestCase):
def setup_server(self):
Expand Down
3 changes: 1 addition & 2 deletions test/mockupdb/test_slave_okay_sharded.py
Expand Up @@ -23,12 +23,11 @@
from queue import Queue

from mockupdb import MockupDB, going
from operations import operations # type: ignore[import]

from pymongo import MongoClient
from pymongo.read_preferences import make_read_preference, read_pref_mode_from_name

from .operations import operations


class TestSlaveOkaySharded(unittest.TestCase):
def setup_server(self):
Expand Down
3 changes: 1 addition & 2 deletions test/mockupdb/test_slave_okay_single.py
Expand Up @@ -23,13 +23,12 @@
import unittest

from mockupdb import MockupDB, going
from operations import operations # type: ignore[import]

from pymongo import MongoClient
from pymongo.read_preferences import make_read_preference, read_pref_mode_from_name
from pymongo.topology_description import TOPOLOGY_TYPE

from .operations import operations


def topology_type_name(client):
topology_type = client._topology._description.topology_type
Expand Down

0 comments on commit b290f7b

Please sign in to comment.