@@ -0,0 +1,1084 @@
+import json%0Aimport unittest%0A%0Afrom uuid import uuid4%0A%0Afrom alerta.app import app%0A%0A%0Aclass PluginsTestCase(unittest.TestCase):%0A%0A    def setUp(self):%0A%0A        app.config%5B'TESTING'%5D = True%0A        app.config%5B'AUTH_REQUIRED'%5D = False%0A        app.config%5B'PLUGINS'%5D = %5B'amqp', 'enhance', 'logstash', 'normalise', 'reject', 'sns'%5D%0A        self.app = app.test_client()%0A%0A        self.resource = str(uuid4()).upper()%5B:8%5D%0A%0A        self.reject_alert = %7B%0A            'event': 'node_marginal',%0A            'resource': self.resource,%0A            'environment': 'Production',%0A            'service': %5B%5D,  # alert will be rejected because service not defined%0A            'severity': 'warning',%0A            'correlate': %5B'node_down', 'node_marginal', 'node_up'%5D%0A        %7D%0A%0A        self.headers = %7B%0A            'Content-type': 'application/json'%0A        %7D%0A%0A    def tearDown(self):%0A%0A        pass%0A%0A    def test_reject_alert(self):%0A%0A        # create alert%0A        response = self.app.post('/alert', data=json.dumps(self.reject_alert), headers=self.headers)%0A        self.assertEqual(response.status_code, 403)%0A

Add test for plugins