django-rest-framework/tests
Kevin Brown e888fc11c7
Merge NullBooleanField with BooleanField(allow_null=True) (#7122)
* Make `NullBooleanField` subclass `BooleanField`

This removes a lot of the redundancy that was in place becuase we
were not doing this. This maintains the `None` initial value that
was previously present, as well as disallowing `allow_null` to be
passed in.

* Remove special case for mapping `NullBooleanField`

In newer versions of Django, the `NullBooleanField` is handled the
same way as a `BooleanField(null=True)`. Given that we also support
that combination, and that our own `NullBooleanField` behaves in the
same manner, it makes sense to remove the special casing that exists
for it.

* Add test for BooleanField(null=True, choices)

* Remove special case for NullBooleanField

* Adjust mapping tests for NullBooleanField

* Fixed linting error

* Raise deprecation warning when NullBooleanField is used

* Fix linting issue in imports
2020-05-13 14:59:04 +01:00
..
authentication decode base64 credentials as utf8; adjust tests (#7193) 2020-02-17 16:10:52 +00:00
browsable_api Drop default 'utf-8' to .encode()/.decode() (#6633) 2019-05-01 07:49:16 +02:00
generic_relations Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
importable Fix lazy translation of ListField errors (#6708) 2019-05-22 19:41:53 -07:00
schemas Convert openapi.AutoSchema methods to public API. 2020-04-09 20:05:16 +02:00
__init__.py Support for running the test suite with py.test 2014-03-02 12:40:30 +01:00
conftest.py Django 3 compat (#7058) 2019-11-21 11:55:53 +00:00
models.py Replace all usage ugettext functions with the non-u versions (#6634) 2019-05-01 07:49:54 +02:00
test_api_client.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_atomic_requests.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_authtoken.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_bound_fields.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_decorators.py Minor test improvements (#7297) 2020-04-29 11:21:42 +01:00
test_description.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_encoders.py JSONEncoder: ensure empty listlikes remain lists, not dicts (#6794) 2019-07-09 11:41:05 +01:00
test_exceptions.py Replace all usage ugettext functions with the non-u versions (#6634) 2019-05-01 07:49:54 +02:00
test_fields.py Make CharField prohibit surrogate characters (#7026) (#7067) 2020-01-06 14:12:21 +00:00
test_filters.py Fix SearchFilter.must_call_distinict for annotation+m2m (#7146) 2020-05-11 10:55:39 +01:00
test_generics.py Allow context to be provided to get_serializer (#7298) 2020-04-29 11:19:44 +01:00
test_htmlrenderer.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_lazy_hyperlinks.py Lazy hyperlink names (#4554) 2016-10-11 12:18:00 +01:00
test_metadata.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_middleware.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_model_serializer.py Merge NullBooleanField with BooleanField(allow_null=True) (#7122) 2020-05-13 14:59:04 +01:00
test_multitable_inheritance.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_negotiation.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_one_to_one_with_inheritance.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_pagination.py Added example for pagination in schemas. (#7275) 2020-04-24 16:13:13 +02:00
test_parsers.py Drop default 'utf-8' to .encode()/.decode() (#6633) 2019-05-01 07:49:16 +02:00
test_permissions.py Pass custom code to PermissionDenied if permission class had one set (#7306) 2020-05-01 10:22:36 +01:00
test_prefetch_related.py Remove Django 1.8 & 1.9 compatibility code (#5481) 2017-10-05 20:41:38 +02:00
test_relations_hyperlink.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_relations_pk.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_relations_slug.py fix wrong assert 2017-01-21 02:25:36 +06:00
test_relations.py Django 3 compat (#7058) 2019-11-21 11:55:53 +00:00
test_renderers.py Minor test improvements (#7297) 2020-04-29 11:21:42 +01:00
test_request.py Minor test improvements (#7297) 2020-04-29 11:21:42 +01:00
test_requests_client.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_response.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_reverse.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_routers.py Update framework deprecation warnings (#7075) 2019-12-04 16:18:38 -08:00
test_serializer_bulk_update.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_serializer_lists.py Enforce allow_empty=False during partial validation of parent serializer (#6512) 2019-07-01 13:30:16 +01:00
test_serializer_nested.py Fix nested write of non-relational fields (#6916) 2019-10-03 09:33:37 -07:00
test_serializer.py Fix serializer multiple inheritance bug (#6980) 2019-12-12 14:03:55 +00:00
test_settings.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_status.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_templates.py Drop default 'utf-8' to .encode()/.decode() (#6633) 2019-05-01 07:49:16 +02:00
test_templatetags.py Fix typos (#6835) 2019-07-25 10:04:01 -07:00
test_testing.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_throttling.py Handle 'None' return value of wait() properly during throttling. (#6837) 2019-08-12 11:36:05 -07:00
test_urlpatterns.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_utils.py Fix typos (#6835) 2019-07-25 10:04:01 -07:00
test_validation_error.py more pytest style assert (#4719) 2016-11-30 09:48:33 +00:00
test_validation.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_validators.py Fix ModelSerializer unique_together handling for field sources (#7143) 2020-05-13 11:11:26 +01:00
test_versioning.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_views.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00
test_viewsets.py Minor test improvements (#7297) 2020-04-29 11:21:42 +01:00
test_write_only_fields.py tests: remove some dead code, use assert 0 for never called methods (#5973) 2018-05-08 13:28:46 +01:00
urls.py Add "optionals not required" build (#6047) 2018-06-22 10:16:57 +02:00
utils.py Dropped Python 2 compatibility. (#6615) 2019-04-30 17:53:44 +02:00