From 162c3ae179f69bd326325b135c3831ae12843e49 Mon Sep 17 00:00:00 2001 From: dongwenjuan Date: Tue, 11 Jul 2017 19:07:22 +0800 Subject: refactor sample consumer JIRA: DOCTOR-113 Change-Id: I60f17953e9b1cdf31ea50f313b33f8ede0831bc2 Signed-off-by: dongwenjuan --- tests/consumer/base.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/consumer/base.py (limited to 'tests/consumer/base.py') diff --git a/tests/consumer/base.py b/tests/consumer/base.py new file mode 100644 index 00000000..35170748 --- /dev/null +++ b/tests/consumer/base.py @@ -0,0 +1,26 @@ +############################################################################## +# Copyright (c) 2017 ZTE Corporation and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +import abc +import six + + +@six.add_metaclass(abc.ABCMeta) +class BaseConsumer(object): + + def __init__(self, conf, log): + self.conf = conf + self.log = log + + @abc.abstractmethod + def start(self): + pass + + @abc.abstractmethod + def stop(self): + pass \ No newline at end of file -- cgit 1.2.3-korg