Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
fix(test): fix routes assert in tests
  • Loading branch information
hanhxiao committed Aug 13, 2019
1 parent 0133905 commit 5b8acf7c547fb20b9f687c5d641e214c3e54b11e
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/test_image_preprocessor.py
@@ -112,7 +112,7 @@ def test_unary_preprocessor_service_realdata(self):
msg.request.index.CopyFrom(req.index)
client.send_message(msg)
r = client.recv_message()
self.assertEqual(r.envelope.routes[0].service, 'PreprocessorService:BaseUnaryPreprocessor')
self.assertEqual(r.envelope.routes[0].service, 'BaseUnaryPreprocessor')
for d in r.request.index.docs:
self.assertEqual(len(d.chunks), 1)
self.assertEqual(len(blob2array(d.chunks[0].blob).shape), 3)
@@ -135,7 +135,7 @@ def test_resize_preprocessor_service_realdata(self):
msg.request.index.CopyFrom(req.index)
client.send_message(msg)
r = client.recv_message()
self.assertEqual(r.envelope.routes[0].service, 'PreprocessorService:PipelinePreprocessor')
self.assertEqual(r.envelope.routes[0].service, 'PipelinePreprocessor')
for d in r.request.index.docs:
self.assertEqual(len(d.chunks), 1)
self.assertEqual(len(blob2array(d.chunks[0].blob).shape), 3)
@@ -161,7 +161,7 @@ def test_slidingwindow_preprocessor_service_realdata(self):
msg.request.index.CopyFrom(req.index)
client.send_message(msg)
r = client.recv_message()
self.assertEqual(r.envelope.routes[0].service, 'PreprocessorService:VanillaSlidingPreprocessor')
self.assertEqual(r.envelope.routes[0].service, 'VanillaSlidingPreprocessor')
for d in r.request.index.docs:
self.assertEqual(len(blob2array(d.chunks[0].blob).shape), 3)
self.assertEqual(blob2array(d.chunks[0].blob).shape[-1], 3)
@@ -186,7 +186,7 @@ def test_segmentation_preprocessor_service_realdata(self):
msg.request.index.CopyFrom(req.index)
client.send_message(msg)
r = client.recv_message()
self.assertEqual(r.envelope.routes[0].service, 'PreprocessorService:SegmentPreprocessor')
self.assertEqual(r.envelope.routes[0].service, 'SegmentPreprocessor')
for d in r.request.index.docs:
self.assertEqual(len(blob2array(d.chunks[0].blob).shape), 3)
self.assertEqual(blob2array(d.chunks[0].blob).shape[-1], 3)

0 comments on commit 5b8acf7

Please sign in to comment.