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

_tmp_session should validate session input

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Unknown
    • Resolution: Fixed
    • None
    • 4.2
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: