From 8495e5136d51f112eee37a17dc88692577b7f11d Mon Sep 17 00:00:00 2001 From: cpavelchek Date: Sat, 27 Jun 2020 12:17:20 -0700 Subject: [PATCH] redid testing --- .../consumers/mibi_consumer_test.py | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/redis_consumer/consumers/mibi_consumer_test.py b/redis_consumer/consumers/mibi_consumer_test.py index 4537c974..587099ee 100644 --- a/redis_consumer/consumers/mibi_consumer_test.py +++ b/redis_consumer/consumers/mibi_consumer_test.py @@ -222,26 +222,20 @@ def get_model_metadata(model_name, model_version): dummyhash = '{}:new.tiff:{}'.format(prefix, status) - model_shapes = [ - (-1, 512, 512, 2), # image too small, pad - (-1, 256, 256, 2), # image is exactly the right size - (-1, 128, 128, 2), # image too big, tile - ] + model_shape = (-1, 256, 256, 2) consumer._handle_error = _handle_error consumer.grpc_image = grpc_image - for model_shape in model_shapes: - - consumer.get_model_metadata = \ - make_model_metadata_of_size(model_shape) + consumer.get_model_metadata = \ + make_model_metadata_of_size(model_shape) - result = consumer._consume(dummyhash) - assert result == consumer.final_status - # test with a finished hash - result = consumer._consume('{}:test.tiff:{}'.format( - prefix, consumer.final_status)) - assert result == consumer.final_status + result = consumer._consume(dummyhash) + assert result == consumer.final_status + # test with a finished hash + result = consumer._consume('{}:test.tiff:{}'.format( + prefix, consumer.final_status)) + assert result == consumer.final_status # test with model_name and model_version redis_client.hgetall = lambda x: {