diff options
Diffstat (limited to 'opendc')
| -rw-r--r-- | opendc/api/v2/schedulers/endpoint.py | 12 | ||||
| -rw-r--r-- | opendc/api/v2/schedulers/test_endpoint.py | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/opendc/api/v2/schedulers/endpoint.py b/opendc/api/v2/schedulers/endpoint.py index 4f3948a9..0bbc3322 100644 --- a/opendc/api/v2/schedulers/endpoint.py +++ b/opendc/api/v2/schedulers/endpoint.py @@ -1,14 +1,10 @@ -from opendc.models_old.scheduler import Scheduler from opendc.util.rest import Response -def GET(request): - """Get all available Schedulers.""" - - # Get the Schedulers +SCHEDULERS = ['DEFAULT'] - schedulers = Scheduler.query() - # Return the Schedulers +def GET(_): + """Get all available Schedulers.""" - return Response(200, 'Successfully retrieved Schedulers.', [x.to_JSON() for x in schedulers]) + return Response(200, 'Successfully retrieved Schedulers.', [{'name': name} for name in SCHEDULERS]) diff --git a/opendc/api/v2/schedulers/test_endpoint.py b/opendc/api/v2/schedulers/test_endpoint.py new file mode 100644 index 00000000..a0bd8758 --- /dev/null +++ b/opendc/api/v2/schedulers/test_endpoint.py @@ -0,0 +1,2 @@ +def test_get_schedulers(client): + assert '200' in client.get('/api/v2/schedulers').status |
