Commit Graph

100 Commits

Author SHA1 Message Date
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
Berker Peksag 1a3bf236c0 Avoided db queries in test_indentation_whitespace. 2016-06-29 09:56:27 -04:00
Berker Peksag c1b6f554e4 Fixed #15091 -- Allowed passing custom encoder to JSON serializer. 2016-06-28 11:10:07 -04:00
Jon Dufresne 4f336f6652 Fixed #26747 -- Used more specific assertions in the Django test suite. 2016-06-16 14:19:18 -04:00
Berker Peksag 724dd2043e Fixed #26717 -- Added Serializer.stream_class to customize the stream. 2016-06-08 11:08:18 -04:00
Tim Graham 87338198e9 Fixed #26320 -- Deprecated implicit OneToOnField parent_link. 2016-04-22 12:59:41 -04:00
Tim Graham 92053acbb9 Fixed E128 flake8 warnings in tests/. 2016-04-08 10:12:33 -04:00
Tim Graham 2cd2d18851 Fixed W503 flake8 warnings. 2016-04-04 17:14:26 -04:00
Hasan 26ad01719d Refs #26022 -- Replaced six.assertRaisesRegex with assertRaisesMessage as appropriate. 2016-01-29 13:37:33 -05:00
Hasan 3d0dcd7f5a Refs #26022 -- Used context manager version of assertRaises in tests. 2016-01-29 12:32:18 -05:00
Josh Soref 93452a70e8 Fixed many spelling mistakes in code, comments, and docs. 2015-12-03 12:48:24 -05:00