X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Ftest%2Fcore%2Ftest_common_consumer.py;h=97231c017d8e0c95bfb8bcfb0b3756741f2809c6;hb=987f8f62bf405ac78a4a1ea3f6e634c686119e05;hp=0306893beb07deb41c2c4418e47521b79f2f5796;hpb=27153c4846a5caeee4a430527fd87cd322408f4b;p=osm%2FMON.git diff --git a/osm_mon/test/core/test_common_consumer.py b/osm_mon/test/core/test_common_consumer.py index 0306893..97231c0 100644 --- a/osm_mon/test/core/test_common_consumer.py +++ b/osm_mon/test/core/test_common_consumer.py @@ -1,12 +1,34 @@ +# -*- coding: utf-8 -*- + +# Copyright 2018 Whitestack, LLC +# ************************************************************* + +# This file is part of OSM Monitoring module +# All Rights Reserved to Whitestack, LLC + +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# For those usages not covered by the Apache License, Version 2.0 please +# contact: bdiaz@whitestack.com or glavado@whitestack.com +## import unittest +from unittest import mock -import mock from kafka import KafkaProducer from kafka.errors import KafkaError from osm_common import dbmongo -from osm_mon.core.database import VimCredentials -from osm_mon.core.message_bus.common_consumer import * +from osm_mon.core.database import VimCredentials, DatabaseManager +from osm_mon.core.message_bus.common_consumer import CommonConsumer @mock.patch.object(dbmongo.DbMongo, "db_connect", mock.Mock())