Added an extension that literally just raises an exception
This commit is contained in:
parent
efac711da9
commit
43c16f1b76
2 changed files with 15 additions and 0 deletions
1
openflexure_microscope/api/dev_extensions/__init__.py
Normal file
1
openflexure_microscope/api/dev_extensions/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
from .raiser import raiser_extension_v2
|
||||
14
openflexure_microscope/api/dev_extensions/raiser.py
Normal file
14
openflexure_microscope/api/dev_extensions/raiser.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
from labthings.server.extensions import BaseExtension
|
||||
from labthings.server.view import ActionView
|
||||
|
||||
class RaiseException(ActionView):
|
||||
def post(self):
|
||||
raise Exception("The developer raised an exception")
|
||||
|
||||
raiser_extension_v2 = BaseExtension(
|
||||
"org.openflexure.dev.raiser",
|
||||
version="0.1.0",
|
||||
description="Actions to cause various traumatic events in the microscope, used for testing.",
|
||||
)
|
||||
|
||||
raiser_extension_v2.add_view(RaiseException, "/raise")
|
||||
Loading…
Add table
Add a link
Reference in a new issue