rest_framework_tricks.tests package

Submodules

rest_framework_tricks.tests.base module

Base tests.

class rest_framework_tricks.tests.base.BaseRestFrameworkTestCase(methodName='runTest')[source]

Bases: APITestCase

Base REST framework test case.

authenticate()[source]

Helper for logging the user in.

Returns:

pytestmark = [Mark(name='django_db', args=(), kwargs={}), Mark(name='django_db', args=(), kwargs={})]
classmethod setUpTestData()[source]

Set up class.

class rest_framework_tricks.tests.base.BaseTestCase(methodName='runTest')[source]

Bases: TestCase

Base test case.

pytestmark = [Mark(name='django_db', args=(), kwargs={}), Mark(name='django_db', args=(), kwargs={})]
classmethod setUpTestData()[source]

Set up class.

rest_framework_tricks.tests.test_nested_proxy_field module

Test NestedProxyField.

class rest_framework_tricks.tests.test_nested_proxy_field.TestNestedProxyFieldCreateAction(methodName='runTest')[source]

Bases: TestNestedProxyFieldActionBase

Test NestedProxyField - create action.

get_client_action() Callable[source]

Get client action.

Returns:

Client action.

Return type:

callable

get_status_code() int[source]

Get status code.

Returns:

Status code expected as result of the action.

Return type:

str

classmethod setUpClass()[source]

Set up.

test_another_nested_proxy_field_model_serializer_depth()[source]

Test NestedProxyField and ModelSerializer with more depth.

test_another_nested_proxy_field_model_serializer_more_depth()[source]

Test NestedProxyField and ModelSerializer with more depth.

test_nested_proxy_field_hyperlinked_model_serializer()[source]

Test NestedProxyField and HyperlinkedModelSerializer.

test_nested_proxy_field_model_serializer()[source]

Test NestedProxyField and ModelSerializer.

test_nested_proxy_field_model_serializer_depth()[source]

Test NestedProxyField and ModelSerializer with more depth.

test_nested_proxy_field_model_serializer_depth_missing_fields()[source]

Test NestedProxyField and ModelSerializer with more depth.

Several non-required fields are missing.

test_nested_proxy_field_model_serializer_depth_more_missing_fields()[source]

Test NestedProxyField and ModelSerializer with more depth.

All of the non-required fields are missing.

test_nested_proxy_field_model_serializer_missing_all_nested_fields()[source]

Test NestedProxyField and ModelSerializer.

test_nested_proxy_field_model_serializer_missing_fields()[source]

Test NestedProxyField and ModelSerializer with missing fields.

class rest_framework_tricks.tests.test_nested_proxy_field.TestNestedProxyFieldUpdateAction(methodName='runTest')[source]

Bases: TestNestedProxyFieldActionBase

Test NestedProxyField - update action.

get_client_action() Callable[source]

Get client action.

Returns:

Client action.

Return type:

callable

get_status_code() int[source]

Get status code.

Returns:

Status code expected as result of the action.

Return type:

str

pytestmark = [Mark(name='django_db', args=(), kwargs={}), Mark(name='django_db', args=(), kwargs={})]
classmethod setUpClass()[source]

Set up.

test_another_nested_proxy_field_model_serializer_depth()[source]

Test NestedProxyField and ModelSerializer with more depth.

test_another_nested_proxy_field_model_serializer_more_depth()[source]

Test NestedProxyField and ModelSerializer with more depth.

test_nested_proxy_field_hyperlinked_model_serializer()[source]

Test NestedProxyField and HyperlinkedModelSerializer.

test_nested_proxy_field_model_serializer()[source]

Test NestedProxyField and ModelSerializer.

test_nested_proxy_field_model_serializer_depth()[source]

Test NestedProxyField and ModelSerializer with more depth.

test_nested_proxy_field_model_serializer_depth_missing_fields()[source]

Test NestedProxyField and ModelSerializer with more depth.

Several non-required fields are missing.

test_nested_proxy_field_model_serializer_depth_more_missing_fields()[source]

Test NestedProxyField and ModelSerializer with more depth.

All of the non-required fields are missing.

test_nested_proxy_field_model_serializer_missing_all_nested_fields()[source]

Test NestedProxyField and ModelSerializer.

test_nested_proxy_field_model_serializer_missing_fields()[source]

Test NestedProxyField and ModelSerializer with missing fields.

rest_framework_tricks.tests.test_ordering_filter module

Test OrderingFilter.

class rest_framework_tricks.tests.test_ordering_filter.TestOrderingFilter(methodName='runTest')[source]

Bases: BaseRestFrameworkTestCase

Test OrderingFilter.

pytestmark = [Mark(name='django_db', args=(), kwargs={}), Mark(name='django_db', args=(), kwargs={})]
classmethod setUpClass()[source]

Set up.

test_ordering()[source]

Test ordering (ascending).

Returns:

test_ordering_descending()[source]

Test ordering (descending).

Returns:

test_ordering_list()[source]

Test ordering list (ascending).

Returns:

test_ordering_list_descending()[source]

Test ordering list (descending).

Returns:

test_standard_no_ordering()[source]

Test standard no ordering.

Returns:

test_standard_ordering()[source]

Test standard ordering (ascending).

Returns:

test_standard_ordering_descending()[source]

Test standard ordering (descending).

Returns:

rest_framework_tricks.tests.test_utils module

Test utils.

class rest_framework_tricks.tests.test_utils.TestUtils(methodName='runTest')[source]

Bases: BaseTestCase

Test utils.

pytestmark = [Mark(name='django_db', args=(), kwargs={}), Mark(name='django_db', args=(), kwargs={})]
test_dict_proxy()[source]

Test DictProxy.

Module contents