Claude Paroz
adf58311b8
Fixed #29078 -- Made serializers respect prefetch_related() for m2m fields.
2020-05-25 10:45:16 +02:00
Simon Charette
94f63b926f
Refs #31395 -- Relied on setUpTestData() test data isolation in various tests.
2020-05-15 20:22:56 +02:00
Nick Pope
8f10ceaa90
Changed `'%s' % value` pattern to `str(value)`.
2020-05-04 08:27:18 +02:00
Hasan Ramezani
68fc21b378
Fixed #29249 -- Made JSON and YAML serializers use Unicode by default.
2020-04-28 11:11:39 +02:00
Hasan Ramezani
8970bb4cfd
Refs #29249 -- Added tests for serializing Unicode data with XML serializer.
2020-04-28 11:11:39 +02:00
Mariusz Felisiak
cf21fc9bf0
Enforced uniqueness of natural keys used in tests.
2020-04-07 10:54:19 +02:00
Hasan Ramezani
fc4f45ebdc
Used assertRaisesMessage() in various tests.
2020-02-07 12:46:23 +01:00
Simon Charette
5779cc938a
Fixed #31071 -- Disabled insert optimization for primary keys with defaults when loading fixtures.
...
Model.save_base() is called directly when loading fixtures and assumes
existing rows will be updated. Branching of "raw" allows to maintain
the optimization introduced in #29260 while supporting this edge case.
Regression in 85458e94e3
.
Thanks Reupen Shah for the report.
2019-12-30 07:49:10 +01:00
Baptiste Mispelon
738e9e615d
Fixed #26743 -- Fixed UnboundLocalError crash when deserializing m2m fields and value isn't iterable.
2019-12-13 11:38:09 +01:00
Caio Ariede
555bebe774
Fixed #30987 -- Added models.PositiveBigIntegerField.
2019-11-19 09:34:11 +01:00
Min ho Kim
65e86948b8
Corrected several typos in string literals and test names.
2019-08-07 11:23:14 +02:00
Nadège Michel
fb54aca540
Added test for serializing child model without inherited fields.
2019-06-27 15:10:22 +02:00
Nadège Michel
895b15771e
Fixed #28725 -- Prevented serializing inherited ManyToManyFields in child model.
2019-06-27 15:10:22 +02:00
Tobias Kunze
a9b8898242
Refs #11929 -- Fixed ordering of test YAML dumps.
...
Thanks Nick Pope for the review.
2019-05-03 10:48:18 +02:00
Mariusz Felisiak
9006189c0e
Removed unused YamlSerializerTestCase.fwd_ref_str.
...
Unused since its introduction in febd5aeec6
.
2019-05-03 10:00:06 +02:00
Tim Graham
55490ac746
Fixed serializers test crash if PyYAML isn't installed.
...
Follow up to a57c783dd4
.
2019-03-20 09:23:50 -04:00
Mariusz Felisiak
a57c783dd4
Fixed serializers tests for PyYAML 5.1+.
2019-03-14 13:16:48 -04:00
Matt Wiens
e817ae74da
Followed style guide for model attribute ordering.
2018-12-27 19:34:14 -05:00
dmytryi.striletskyi
dcd1025f4c
Fixed #28385 -- Fixed deserializing natural keys when primary key has a default value.
...
Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
2018-11-27 18:35:19 -05:00
Peter Inglesby
312eb5cb11
Fixed #26291 -- Allowed loaddata to handle forward references in natural_key fixtures.
2018-07-13 17:54:47 -04:00
Tim Graham
5fa4f40f45
Fixed #29227 -- Allowed BooleanField to be null=True.
...
Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
2018-03-20 12:10:10 -04:00
Denys Duchier
cb7860cced
Fixed #24607 -- Serialized natural keys in multi-table inheritance models.
...
Thanks João Paulo Melo de Sampaio for the test.
2018-02-12 21:15:04 -05:00
Tim Graham
acc8dd4142
Fixed #28984 -- Made assorted code simplifications.
2018-01-03 13:24:02 -05:00
Tim Graham
a862af3839
Fixed #28893 -- Removed unnecessary dict.items() calls.
2017-12-06 17:17:59 -05:00
Simon Charette
e50add6ca1
Fixed #28856 -- Fixed a regression in caching of a GenericForeignKey pointing to a MTI model.
...
Regression in b9f8635f58
.
2017-11-30 09:28:44 -05:00
Claude Paroz
774f5548bd
Fixed #28610 -- Skipped test when serializer is not available
...
Thanks Tim Graham for the review.
2017-09-18 18:22:13 +02:00
Claude Paroz
256182c43d
Revert "Refs #21286 -- Enabled serializer tests with time pk model"
...
This reverts commit 01c6a3e227
.
Unfortunately, the YAML serializer is not yet able to cope with time values.
2017-09-18 09:34:21 +02:00
Claude Paroz
01c6a3e227
Refs #21286 -- Enabled serializer tests with time pk model
2017-09-17 19:29:33 +02:00
Sergey Fedoseev
5b1c389603
Refs #23919 -- Replaced usage of django.utils.functional.curry() with functools.partial()/partialmethod().
2017-09-06 13:11:18 -04:00
Tim Graham
487362fa8f
Fixed #28370 -- Deprecated the context arg of Field.from_db_value() and Expression.convert_value().
...
Unused since a0d166306f
.
2017-07-20 16:30:08 -04:00
Claude Paroz
d02fc8dfd3
Refs #21286 -- Enabled serializer tests with date/datetime pk model
2017-06-05 21:36:25 +02:00
Tim Graham
cde31daf88
Sorted imports per isort 4.2.9.
2017-06-01 13:23:48 -04:00
Tim Graham
0595bca221
Fixed #27742 -- Reverted "Fixed #24607 -- Serialized natural keys in multi-table inheritance models."
...
This reverts commit 74a575eb72
as it causes
unexpected migrations and doesn't seem to be the best solution.
2017-02-11 06:34:59 -05:00
Tim Graham
500532c95d
Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().
2017-02-09 09:03:47 -05:00
Claude Paroz
c651331b34
Converted usage of ugettext* functions to their gettext* aliases
...
Thanks Tim Graham for the review.
2017-02-07 09:04:04 +01:00
chillaranand
d6eaf7c018
Refs #23919 -- Replaced super(ClassName, self) with super().
2017-01-25 12:23:46 -05:00
Tim Graham
7aba69145d
Refs #23919 -- Removed django.test.mock Python 2 compatibility shim.
2017-01-20 08:17:20 -05:00
Simon Charette
cecc079168
Refs #23919 -- Stopped inheriting from object to define new style classes.
2017-01-19 08:39:46 +01:00
Claude Paroz
2b281cc35e
Refs #23919 -- Removed most of remaining six usage
...
Thanks Tim Graham for the review.
2017-01-18 21:33:28 +01:00
Claude Paroz
7b2f2e74ad
Refs #23919 -- Removed six.<various>_types usage
...
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Claude Paroz
f3c43ad1fd
Refs #23919 -- Removed python_2_unicode_compatible decorator usage
2017-01-18 13:44:34 +01:00
Claude Paroz
d7b9aaa366
Refs #23919 -- Removed encoding preambles and future imports
2017-01-18 09:55:19 +01:00
Tim Graham
631f4ab061
Removed Manager.use_for_related_fields and Meta.manager_inheritance_from_future.
...
Per deprecation timeline. Refs ed0ff913c6
.
2017-01-17 20:52:04 -05:00
Keda87
794b7d8033
Refs #27546 -- Tested some __repr__() methods.
2016-12-01 08:09:38 -05:00
Tim Graham
e6262aaaf8
Refs #27358 -- Removed invalid/unneeded FileField.upload_to in tests/docs.
2016-11-30 17:05:31 -05:00
Joachim Jablon
721f0ca85c
Simplified a test after refs #26207 .
2016-11-17 10:23:17 -05:00
Ramin Farajpour Cami
967be82443
Fixed E305 flake8 warnings.
2016-11-14 12:30:46 -05:00
za
321e94fa41
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
2016-11-10 21:30:21 -05:00
João Sampaio
74a575eb72
Fixed #24607 -- Serialized natural keys in multi-table inheritance models.
2016-10-12 20:04:57 -04:00
Will Hardy
8ef78b8165
Fixed #26656 -- Added duration (timedelta) support to DjangoJSONEncoder.
2016-07-14 13:34:15 -04:00