Simplified deployment object logic in test function