mirror of
https://github.com/gsi-upm/senpy
synced 2024-11-25 09:32:29 +00:00
d1006bbc92
* The API has also changed, there are new parameters to send the context as part of the headers. * Improved tests * PEP8 compliance (despite the line about gevent)
17 lines
423 B
Python
17 lines
423 B
Python
from senpy.plugins import SenpyPlugin
|
|
from senpy.models import Response
|
|
from time import sleep
|
|
|
|
|
|
class SleepPlugin(SenpyPlugin):
|
|
|
|
def __init__(self, info, *args, **kwargs):
|
|
super(SleepPlugin, self).__init__(info, *args, **kwargs)
|
|
self.timeout = int(info["timeout"])
|
|
|
|
def activate(self, *args, **kwargs):
|
|
sleep(self.timeout)
|
|
|
|
def analyse(self, *args, **kwargs):
|
|
return Response()
|