class TestMongodbHandler(unittest.TestCase):
    def setUp(self):
        self.handler = MongodbHandler({'host':'192.168.1.121',
                                       'port':27017,
                                       'username':'******',
                                       'password':'******',
                                       'database':'test',
                                       'collection':'log'})

    def test_emit(self):
        self.handler.emit({'a':1,'b':2},Levels.CACHE)
        # self.assertEqual()
 def setUp(self):
     self.handler = MongodbHandler({'host':'192.168.1.121',
                                    'port':27017,
                                    'username':'******',
                                    'password':'******',
                                    'database':'test',
                                    'collection':'log'})