Commit graph

22 commits

Author SHA1 Message Date
David Smith
79ff8ea6be
Used isort to sort imports (#460) 2020-11-29 20:58:00 +00:00
Hasan Ramezani
79cbc96055 Replace ugettext_lazy with gettext_lazy in test models to satisfy Django deprecation warning. 2020-11-28 19:26:34 +01:00
Arseniy Panfilov
fdd3af34d9 failing tests with different types of arguments for 'updated_fields' 2020-10-15 15:51:33 +06:00
Sergey Tikhonov
1386c379b7 FieldTracker should patch save_base instead of save (#404)
* add test for reproducing FieldTracker update_fields issue

FieldTracker does not see update_fields changed in tracked model.save() method

* Patch Model.save_base instead of save

This change allows proper capturing update_fields kwarg if is is changed in overridden save() method.

* Add some details about FieldTracker implementation

* Mention FieldTracker behavior change
2019-12-15 22:43:58 +06:00
Misha K
5aa40c66be Add django 3.0 to the test matrix and drop six (#395)
*  - add django 3.0 to the test matrix
 - drop six

* add entry in CHANGES

* remove context kwarg

* fix test with DeferredAttribute

* rename StringyDescriptor's name to attname

* Fix flake8

* Drop support for Django 1.11 because the API are not compatibles anymore with Django 3.0

* Try to fix tests.

* Define model for the field mock.

* Simplifies the code.

* Properly mock the field.

* Typo

* Use the new API field name.

* Call it attname

* Grab the field instance from the model.

* Use postgres in travis tests.

* Django 2.0.1 minimum is needed.

* Update Changelog to tell about breaking Django 1.11.

* Update changelog to tell about Django 3.0 support.

* @natim review.
2019-12-09 19:37:16 +06:00
Adam Dobrawy
ffa1a85dc7 Modernize Python syntax, add Python 3.8 (#398)
* Modernize Python syntax, add Python 3.8

* Update Python version & dist in TravisCI

* Add postgresql as addon

* Switch to psycopg2-binary

* Drop django.utils.six
2019-11-14 22:50:04 +06:00
Hasan Ramezani
aa94194dbc Drop Python 2 support. (#394) 2019-09-30 14:08:52 +06:00
asday
d9aa34e498 Fixed spacing.
Extraneous whitespace, too many blank lines, and too few blank
lines.
2019-08-19 22:38:05 +01:00
asday
b7483fa538 Removed an unused import. 2019-08-19 22:37:01 +01:00
Emin Bugra Saral
5d6f8f4e9f Disable signals on save feature 2019-05-20 19:35:05 +02:00
Asif Saif Uddin
25dde41418
Merge pull request #360 from marfyl/master
Add UUIDModel and UUIDField
2019-05-16 05:45:53 +06:00
Jack Cushman
f2e97e4141 Move patch_save to finalize_class so it works on models with save() methods 2019-04-25 17:50:08 -04:00
Nick Sandford
d557c42533 Catch deferred attribute exception (#367) 2019-03-29 12:46:40 +06:00
Skia
1b9b5ac2c1 managers: honor OneToOneField.parent_link=False (#363) 2019-03-12 23:29:02 +06:00
JMP
8d9a00b89b Fix pep8 error 2019-02-26 18:16:01 +01:00
JMP
5ff0867bf9 UUIDModels for testing purposes 2019-02-26 17:35:50 +01:00
Jonathan Sundqvist
2cb773372d Add a JoinManager that helps with performance (#351)
* Add the join manager + tests

* Documentation for join manager

* Use order_by for consistent tests

* Use postgres instead sqlite for tests for better reliability

* Fix coverage

* Drop django 1.8
2018-11-25 20:18:23 +06:00
Lucas Wiman
679aed41a2 Remove unused __unicode__ method (dead code). 2018-07-02 11:52:05 -07:00
Lucas Wiman
15f9393bb2 Handle API change in DeferredAttribute descriptor in django-trunk.
This should maintain compatibility with the next version of django.
2018-06-28 13:16:33 -07:00
Lucas Wiman
90ed7fc905 Improve coverage. 2018-06-21 12:41:42 -07:00
Lucas Wiman
be52bc9290 Add failing test for deferred attributes. 2018-06-21 12:41:42 -07:00
Bruno Alla
10ebc16271 Exclude tests from distribution
fixes #258
2017-02-15 23:00:10 +00:00
Renamed from model_utils/tests/models.py (Browse further)