Skip to content

[4.1.2] - TypeError: 'Collection' object is not callable. #811

Closed

Description

@engFelipeMonteiro

I have some test that I have been developed in past few month, when updated the mongomock to version 4.1.2 a test I have started to failed.

coll = db.collection
coll.update({params})

it gives me the following error:

TypeError: 'Collection' object is not callable. If you meant to call the 'update' method on a 'Collection' object it is failing because no such method exists.

I was using 3.22.0 as a version for my project.

Sorry I cant give exact code I used

I have this schema in about 20 tests but only in 1 this ocurr.

Activity

  1. engFelipeMonteiro commented on Oct 2, 2023

    @engFelipeMonteiro
    CollaboratorAuthor

    This may occour if you upgrade pymongo versions, it was replaced by "update_one" or "update_many", the same occurs with insert, remove methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions