hawat.blueprints.detectors.test package

Unit tests for hawat.blueprints.detectors.

class hawat.blueprints.detectors.test.DetectorTestMixin[source]

Bases: object

Mixin class for detector specific tests.

detector_get(detector_name, with_app_context=False)[source]

Get given detector.

detector_id(detector_type, with_app_context=False)[source]

Get ID of given detector.

detector_save(detector_object, with_app_context=False)[source]

Update given detector.

class hawat.blueprints.detectors.test.DetectorsCreateTestCase(methodName='runTest')[source]

Bases: hawat.blueprints.detectors.test.DetectorTestMixin, hawat.test.runner.TestRunnerMixin, hawat.test.ItemCreateHawatTestCase

Class for testing detectors.create endpoint.

detector_data_fixture = [('name', 'TEST_DETECTOR'), ('credibility', 0.24), ('description', 'Test detector for unit testing purposes.')]
test_01_as_user(*args, **kwargs)
test_02_as_developer(*args, **kwargs)
test_03_as_maintainer(*args, **kwargs)
test_04_as_admin(*args, **kwargs)
class hawat.blueprints.detectors.test.DetectorsDeleteTestCase(methodName='runTest')[source]

Bases: hawat.blueprints.detectors.test.DetectorTestMixin, hawat.test.runner.TestRunnerMixin, hawat.test.HawatTestCase

Class for testing detectors.delete endpoint.

test_01_as_user(*args, **kwargs)
test_02_as_developer(*args, **kwargs)
test_03_as_maintainer(*args, **kwargs)
test_04_as_admin(*args, **kwargs)
class hawat.blueprints.detectors.test.DetectorsListTestCase(methodName='runTest')[source]

Bases: hawat.test.runner.TestRunnerMixin, hawat.test.HawatTestCase

Class for testing detectors.list endpoint.

test_01_as_user(*args, **kwargs)
test_02_as_developer(*args, **kwargs)
test_03_as_maintainer(*args, **kwargs)
test_04_as_admin(*args, **kwargs)
class hawat.blueprints.detectors.test.DetectorsShowTestCase(methodName='runTest')[source]

Bases: hawat.blueprints.detectors.test.DetectorTestMixin, hawat.test.runner.TestRunnerMixin, hawat.test.HawatTestCase

Base class for testing detectors.show endpoint.

test_01_as_user(*args, **kwargs)
test_02_as_developer(*args, **kwargs)
test_03_as_maintainer(*args, **kwargs)
test_04_as_admin(*args, **kwargs)
class hawat.blueprints.detectors.test.DetectorsUpdateTestCase(methodName='runTest')[source]

Bases: hawat.blueprints.detectors.test.DetectorTestMixin, hawat.test.runner.TestRunnerMixin, hawat.test.HawatTestCase

Class for testing detectors.update endpoint.

test_01_as_user(*args, **kwargs)
test_04_as_developer(*args, **kwargs)
test_05_as_maintainer(*args, **kwargs)
test_06_as_admin(*args, **kwargs)