Refactored and Added test_catalog.py