diff --git a/tests/test_encoder_service.py b/tests/test_encoder_service.py index 81be64d3..2f4e540a 100644 --- a/tests/test_encoder_service.py +++ b/tests/test_encoder_service.py @@ -9,15 +9,10 @@ from gnes.service.base import ServiceManager from gnes.service.encoder import EncoderService from gnes.encoder.base import BaseEncoder -from gnes.helper import train_required -class DummyEncoder(BaseEncoder): +class TestEncoder(BaseEncoder): - def train(self, *args, **kwargs): - pass - - @train_required def encode(self, x): return np.array(x) @@ -28,7 +23,7 @@ def setUp(self): self.test_numeric = np.random.randint(0, 255, (1000, 1024)).astype('float32') def test_empty_service(self): - args = set_encoder_parser().parse_args(['--yaml_path', '!DummyEncoder {gnes_config: {name: EncoderService, is_trained: True}}']) + args = set_encoder_parser().parse_args(['--yaml_path', '!TestEncoder {gnes_config: {name: EncoderService, is_trained: True}}']) c_args = _set_client_parser().parse_args([ '--port_in', str(args.port_out), '--port_out', str(args.port_in)])