mirror of
https://github.com/gsi-upm/senpy
synced 2025-08-24 02:22:20 +00:00
Added WordNet-Affect plugin and Makefile
This commit is contained in:
@@ -12,5 +12,6 @@
|
||||
"default": 42
|
||||
}
|
||||
},
|
||||
"requirements": ["noop"],
|
||||
"custom_attribute": "42"
|
||||
}
|
||||
|
23
example-plugin/test_example.py
Normal file
23
example-plugin/test_example.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import unittest
|
||||
from flask import Flask
|
||||
import os
|
||||
|
||||
from senpy.extensions import Senpy
|
||||
|
||||
class emoTextWAFTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.app = Flask("Example")
|
||||
self.dir = os.path.join(os.path.dirname(__file__))
|
||||
self.senpy = Senpy(plugin_folder=self.dir, default_plugins=False)
|
||||
self.senpy.init_app(self.app)
|
||||
|
||||
def tearDown(self):
|
||||
self.senpy.deactivate_plugin("ExamplePlugin", sync=True)
|
||||
|
||||
def test_analyse(self):
|
||||
assert len(self.senpy.plugins.keys()) == 1
|
||||
assert True
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
Reference in New Issue
Block a user