Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
fix(test): fix routes assert in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhxiao committed Aug 13, 2019
1 parent 0133905 commit 5b8acf7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_image_preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 5b8acf7

Please sign in to comment.