Question: Needing assistance implementing and testing Update and Delete function of CRUD in this project. I have successfully implemented and tested the Create and Read function.

Needing assistance implementing and testing Update and Delete function of CRUD in this project. I have successfully implemented and tested the Create and Read function. An image of my animal_project.py and Test script is attached. Here is the instructions, thank you:
An Update method that queries for and changes document(s) from a specified MongoDB database and specified collection
Input -> arguments to function should be the key/value lookup pair to use with the MongoDB driver Find API call. The last argument to function will be a set of key/value pairs in the data type acceptable to the MongoDB driver update_one() or update_many() API call.
Return -> The number of objects modified in the collection.
A Delete method that queries for and removes document(s) from a specified MongoDB database and specified collection
Input -> arguments to function should be the key/value lookup pair to use with the MongoDB driver find API call.
Return -> The number of objects removed from the collection.
Finally, you must test your Python module to make sure it works. To do this testing, create a Python script that imports your CRUD Python module to call and test all instances of CRUD functionality
Needing assistance implementing and testing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!