AirBnB_clone_v2 icon indicating copy to clipboard operation
AirBnB_clone_v2 copied to clipboard

storage_get_count

Open Sarerrdy opened this issue 6 months ago • 1 comments

I implemented the get Method in both FileStorage and DBStorage classes which retrieve an object based on its class and ID and returns the object if found, otherwise returns None.

I also implemented the count method in both FileStorage and DBStorage classes which returns the number of objects in storage. It can also return the number of objects of a specific class if provided.

I added 2 new methods to test both the get and count functions in both the test_db_storage.py and test_file_storage.py test files

Sarerrdy avatar Aug 03 '24 21:08 Sarerrdy