def test_to_json_string(self): scaling_response = DynamiteScalingResponse() scaling_response.command = DynamiteScalingCommand.SCALE_DOWN scaling_response.failure_counter = 4 scaling_response.service_instance_name = "apache_service_instance_name" scaling_response.service_name = "apache_service_name" scaling_response.success = False scaling_response.message_processed_callback = lambda: None result_json = scaling_response.to_json_string() result_response = DynamiteScalingResponse.from_json_string(result_json, scaling_response.message_processed_callback) assert result_response == scaling_response
def test_to_json_string(self): scaling_response = DynamiteScalingResponse() scaling_response.command = DynamiteScalingCommand.SCALE_DOWN scaling_response.failure_counter = 4 scaling_response.service_instance_name = "apache_service_instance_name" scaling_response.service_name = "apache_service_name" scaling_response.success = False scaling_response.message_processed_callback = lambda: None result_json = scaling_response.to_json_string() result_response = DynamiteScalingResponse.from_json_string( result_json, scaling_response.message_processed_callback) assert result_response == scaling_response