one.tests.test_alyxrest
Unit tests for Alyx REST queries using the AlyxClient.rest method.
Classes
Tests for AlyxClient.rest method and remote Alyx REST interactions. |
- class TestREST(methodName='runTest')[source]
Bases:
TestCase
Tests for AlyxClient.rest method and remote Alyx REST interactions.
- EID = 'cf264653-2deb-44cb-aa84-89b82507028a'
- EID_EPHYS = 'b1c968ad-4874-468d-b2e4-5ffa9b9964e9'
- alyx = None
- classmethod setUpClass() None [source]
Hook method for setting up class fixture before running tests in the class.
- test_paginated_request()[source]
Check that paginated response object is returned upon making large queries.
- test_print_endpoint_info()[source]
Test endpoint query params are printed when calling AlyxClient.rest without action.
- test_water_restriction()[source]
Test listing water-restriction endpoint.
Examples of how to list all water restrictions and water-restriction for a given subject.
- test_list_pk_query()[source]
Test REST list with id keyword argument.
It’s a bit stupid but the REST endpoint can’t forward a direct query of the uuid via the pk keyword. The AlyxClient has already an id parameter, which on the list method is used as a pk identifier. This special case is tested here.