Exemplo n.º 1
0
 def setUp(self):
     """ setup any state tied to the execution of the given method in a
     class.  setup_method is invoked for every test method of a class.
     """      
     
     args = {"transaction_management":"999"}
     args_string = shlex.quote(json.dumps(args))
     
     self.test_subject = SkillManagementPlugin(123,456,None,args_string)
    
     self.test_subject.send_response = MagicMock()
Exemplo n.º 2
0
 def test_constructor(self):
     """
     SkillManagementPlugin.__init__() Test plan:
         -ensure name, logger set as parameters
         -ensure that mongo is an instance of mongo client
         -ensure that a cache db is set up
     """
     
     args = {"transaction_management":"999"}
     args_string = shlex.quote(json.dumps(args))
     
     test_subject = SkillManagementPlugin(123,456,None,args_string)
     test_subject.logger.should.equal(None)
     
     isinstance(test_subject.mongo,MongoClient).should.equal(True)
     isinstance(test_subject.db,Collection).should.equal(True)