def test_init(self): """Tests if the Honeypot class can be instantiated successfully""" sut = Honeypot(self.work_dir, self.config_dict, key=self.key, cert=self.cert) # expect two messages containing priv/pub key. gevent.sleep(1) self.assertEqual(self.inbox.qsize(), 2)
def test_start_serving(self): sut = Honeypot(self.work_dir, self.config_dict, key=self.key, cert=self.cert) gevent.spawn(sut.start) gevent.sleep(1) # number of capabilities (workers). This value must be updated when adding new capabilities self.assertEquals(9, len(sut._servers))
def test_init(self): """Tests if the Honeypot class can be instantiated successfully""" sut = Honeypot(self.work_dir, self.config_dict, key=self.key, cert=self.cert)