Bastien Gerard
8a1a68ea7c
fix flake8 warnings
2020-12-13 00:14:53 +01:00
Bastien Gerard
eabb8f60f5
autoformat with pyupgrade
2020-12-13 00:14:53 +01:00
Bastien Gerard
c00a378776
autoformat with updated black
2020-12-13 00:14:52 +01:00
Bastien Gérard
f4962fbc40
remove utf8 encoding declaration in test files as it's not needed/recommended
2020-10-30 21:10:21 +01:00
Bastien Gérard
aabc18755c
fix inconsistencies in ._changed_fields computation
2020-10-07 00:01:09 +02:00
Bastien Gérard
8086576677
get rid of six
2020-03-11 23:07:03 +01:00
Bastien Gérard
ac25f4b98b
ran unittest2pytest
2019-10-31 22:59:49 +01:00
Stefan Wójcik
b47669403b
Format the codebase using Black ( #2109 )
...
This commit:
1. Formats all of our existing code using `black`.
2. Adds a note about using `black` to `CONTRIBUTING.rst`.
3. Runs `black --check` as part of CI (failing builds that aren't properly formatted).
2019-06-27 13:05:54 +02:00
Gaurav Dadhania
fdcaca42ae
Do not keep calling _dereference on values if it has already been dereferenced.
2019-03-25 09:43:42 +05:30
Bastien Gérard
6d353dae1e
refactored iteritems/itervalues to improve 2/3 compat #2003
2019-02-18 22:13:05 +01:00
Bastien Gérard
f89214f9cf
Fixes bug where an EmbeddedDocument that shares the same id of its parent Document could be missing updates when .save was called
...
Fixes #1768 , Fixes #1685
2018-09-09 10:40:51 +02:00
Bastien Gérard
003827e916
rewrote some poorly written assertions like: assertTrue(isinstance(a, b)) assertTrue(a==b) assertTrue(a!=b) assertTrue(a in b)
2018-09-06 21:47:06 +02:00
Stefan Wojcik
009059def4
revert #1497
2017-05-07 21:29:13 -04:00
Hiroyasu OHYAMA
9cd3dcdebf
Added a test for the change of the condition in DeReference processing
...
This checks DBRef conversion using DynamicField with the ordering
guarantee.
2017-03-08 14:45:43 +00:00
Stefan Wójcik
835d3c3d18
Improve the health of this package ( #1428 )
2016-12-11 18:49:21 -05:00
Bastien Gérard
df9ed835ca
fixes in unit tests
2016-07-02 23:01:36 +02:00
Emmanuel Leblond
1951b52aa5
Fix #1017 (document clash between same ids but different collections)
2015-06-11 14:55:04 +02:00
Rik
67bf6afc89
fixed tests that were using undefined model fields
2014-11-29 23:20:30 -02:00
Matthew Ellison
43af9f3fad
Update Tests for EmbeddedDocument Unique Indicies
2014-11-20 11:20:04 -05:00
Clay McClure
170693cf0b
Follow ReferenceFields in EmbeddedDocuments with select_related
...
For the following structure:
class Playlist(Document):
items = ListField(EmbeddedDocumentField("PlaylistItem"))
class PlaylistItem(EmbeddedDocument):
song = ReferenceField("Song")
class Song(Document):
title = StringField()
this patch prevents the N+1 queries otherwise required to fetch all
the `Song` instances referenced by all the `PlaylistItem`s.
2014-07-03 13:14:45 -04:00
Ross Lawley
f31b2c4a79
Merge branch 'master' into pr/368
2014-06-27 11:32:19 +01:00
Ross Lawley
661398d891
Fixed dereference issue with embedded listfield referencefields ( #439 )
2013-08-20 10:22:06 +00:00
Ross Lawley
4209d61b13
Document.select_related() now respects db_alias
( #377 )
2013-07-10 12:49:19 +00:00
Stefan Wojcik
e0dd33e6be
move the test into a more appropriate location
2013-06-11 12:18:03 -07:00
Ross Lawley
e58b3390aa
Removed import with from future
2013-05-01 08:48:14 +00:00
Ross Lawley
f0eaec98c7
Merge branch 'master' into 0.8
2013-04-19 12:47:41 +00:00
Ross Lawley
6dcd7006d0
Fix test
2013-04-19 12:47:19 +00:00
Ross Lawley
76fddd0db0
Merge branch 'master' into 0.8
...
Conflicts:
AUTHORS
mongoengine/base.py
tests/test_dereference.py
2013-04-18 13:30:00 +00:00
Ross Lawley
51e50bf0a9
Merge branch 'master' into 0.8M
...
Conflicts:
AUTHORS
docs/django.rst
mongoengine/base.py
mongoengine/queryset.py
tests/fields/fields.py
tests/queryset/queryset.py
tests/test_dereference.py
tests/test_document.py
2013-04-17 11:57:53 +00:00
daniil
c2d77f51bb
test for #278 issue
2013-04-17 12:14:07 +04:00
Ross Lawley
97a98f0045
Only mark a field as changed if the value has changed ( #258 )
2013-04-15 07:52:04 +00:00
Russ Weeks
f9cd8b1841
added unit test for dereference patch
2013-03-12 12:45:38 -07:00
Ross Lawley
0cbd3663e4
Updated tests
2013-01-28 13:40:28 +00:00
Ross Lawley
9797d7a7fb
Added switch_collection context manager and method ( #220 )
2013-01-23 21:19:21 +00:00
Ross Lawley
3a6dc77d36
Added no_dereference context manager ( #82 )
...
Reorganised the context_managers as well
2013-01-23 19:05:44 +00:00
Ross Lawley
6d68ad735c
Fixed validation for GenericReferences
...
Where the references haven't been dereferenced
2013-01-22 17:56:15 +00:00
Ross Lawley
50905ab459
Test update
2013-01-09 08:41:03 +00:00
Ross Lawley
f6f7c12f0e
Added test case checking type with dbref=False
...
Ensures when dbref=False the data is stored as the same type
as the primary key of the item stored. MongoEngine/mongoengine#160
2012-11-27 14:37:13 +00:00
Ross Lawley
b5e868655e
Updated travis.yml
2012-11-27 14:02:49 +00:00
Ross Lawley
2c0fc142a3
Updated travis.yml
2012-11-26 21:04:06 +00:00
Ross Lawley
3d5b6ae332
Inheritance is off by default ( MongoEngine/mongoengine#122 )
2012-10-22 19:29:26 +00:00
Ross Lawley
6a4351e44f
Fixed reload issue with ReferenceField where dbref=False ( MongoEngine/mongoengine#138 )
2012-09-24 18:49:29 +00:00
Ross Lawley
ab4d4e6230
Fix ReferenceField dbref = False
2012-09-18 21:37:45 +00:00
Ross Lawley
ba276452fb
Fix tests
2012-08-23 11:09:07 +01:00
Ross Lawley
4ffa8d0124
Updated ReferenceField's to optionally store ObjectId strings.
...
This will become the default in 0.8 (MongoEngine/mongoengine#89 )
2012-08-23 11:02:38 +01:00
Laine
ed74477150
made compatable with python 2.5
2012-08-03 15:04:59 -07:00
Laine
91aa90ad4a
Added Python 3 support to MongoEngine
2012-08-01 17:21:48 -07:00
Ross Lawley
b0aa98edb4
Deref list custom id fix
2012-07-18 14:09:24 +01:00
Ross Lawley
65a2f8a68b
Updated configs
2012-05-29 17:06:03 +01:00