Пример #1
0
 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)
Пример #2
0
 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))
Пример #3
0
 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)