Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-3228

_tmp_session should validate session input

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.2
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Currently we evaluate the session parameter as truthy, but we should check whether it is None or an instance of ClientSession.

      When updating the synchro tests for motor, I saw that test_helpers_with_let in test_collection.py (introduced in PYTHON-2957) was failing because the wrapped aggregate method takes only one positional argument and the test was providing an empty dict as a second argument.

      If we add the validation, that test should fail and require an update to the args passed to the methods.

            Assignee:
            steve.silvester@mongodb.com Steve Silvester
            Reporter:
            steve.silvester@mongodb.com Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: