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_id_django_fields()[source]
- Test. - The id and django kwargs have a specific meaning when using the list actions on endpoints that implement the Alyx base REST framework. On endpoints that do not implement the base REST framework, such as dataset_types and revisions, the id/django args should yield an error. :return: 
 - test_paginated_request()[source]
- Check that paginated response object is returned upon making large queries. 
 - 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.