Refactoring test_deploy assertExpectedDeployment