Bastien Gérard
2abcf4764d
minor fixes based on review of #2082
2019-06-18 22:15:53 +02:00
Stefan Wójcik
bb0b1e88ef
Split up custom PK field tests ( #2095 )
...
This more closely aligns with the rule that a single tests should test one
thing and one thing only. Previous code tested like 4 different things in a
single test and was hard to follow.
2019-06-18 15:43:46 +02:00
Bastien Gérard
5a2e268160
Add test case to prevent regression
2019-06-17 22:19:41 +02:00
erdenezul
1f02d5fbbd
Merge pull request #1570 from erdenezul/remove_save_embedded
...
EmbeddedDocument should not have save method #1552
2019-06-11 16:15:53 +02:00
Stefan Wojcik
f131b18cbe
Make test_update_shard_key_routing more resilient
2019-06-11 15:50:22 +02:00
Erdenezul Batmunkh
7ad6f036e7
Remove test
2019-06-11 13:16:33 +02:00
Erdenezul Batmunkh
1d29b824a8
Remove save method from test
2019-06-11 12:52:29 +02:00
Stefan Wojcik
8e8c74c621
Drop the unused mongodb_version attribute in IndexesTest
2019-06-07 12:35:38 +02:00
Stefan Wojcik
f996f3df74
Cleaner test_hint
2019-06-07 12:34:32 +02:00
Bastien Gérard
15f4d4fee6
fix tests for diff mongo vers
2019-06-05 21:51:21 +02:00
Bastien Gérard
b407c0e6c6
add test for shard key routing (ported from https://github.com/closeio/mongoengine/commit/43f35f5 )
2019-06-04 23:17:10 +02:00
Bastien Gérard
962997ed16
fix flaky test due to signal receiver garbage collection
2019-06-01 11:13:28 +02:00
Bastien Gérard
9ae8fe7c2d
Improve perf of Doc.save by preventing a full to_mongo() call just to get the created
variable
2019-06-01 11:13:28 +02:00
Stefan Wójcik
4334955e39
Update the test matrix to reflect what's supported in 2019 ( #2066 )
...
Previously, we were running the test suite for several combinations of MongoDB,
Python, and PyMongo:
- PyPy, MongoDB v2.6, PyMongo v3.x (which really means v3.6.1 at the moment)
- Python v2.7, MongoDB v2.6, PyMongo v3.x
- Python v3.5, MongoDB v2.6, PyMongo v3.x
- Python v3.6, MongoDB v2.6, PyMongo v3.x
- Python v2.7, MongoDB v3.0, PyMongo v3.5.0
- Python v3.6, MongoDB v3.0, PyMongo v3.5.0
- Python v3.5, MongoDB v3.2, PyMongo v3.x
- Python v3.6, MongoDB v3.2, PyMongo v3.x
- Python v3.6, MongoDB v3.4, PyMongo v3.x
- Python v3.6, MongoDB v3.6, PyMongo v3.x
There were a couple issues with this setup:
1. MongoDB v2.6 – v3.2 have reached their End of Life already (v2.6 almost 3
years ago!). See the "MongoDB Server" section on
https://www.mongodb.com/support-policy .
2. We were only testing two recent-ish PyMongo versions (v3.5.0 & v3.6.1).
We were not testing the oldest actively supported MongoDB/PyMongo/Python
setup.
This PR updates the test matrix so that these problems are solved. For the
sake of simplicity, it does not yet attempt to cover MongoDB v4.0:
- PyPy, MongoDB v3.4, PyMongo v3.x (aka v3.6.1 at the moment)
- Python v2.7, MongoDB v3.4, PyMongo v3.x
- Python v3.5, MongoDB v3.4, PyMongo v3.x
- Python v3.6, MongoDB v3.4, PyMongo v3.x
- Python v2.7, MongoDB v3.4, PyMongo v3.4
- Python v3.6, MongoDB v3.6, PyMongo v3.x
2019-05-31 11:01:15 +02:00
Bastien Gérard
6e1c132ee8
Improve minor things in the tests
2019-05-26 22:17:58 +02:00
Bastien Gérard
c82f0c937d
more work on coverage
2019-05-17 22:04:28 +02:00
Bastien Gérard
00d2fd685a
more test cov
2019-05-17 22:04:28 +02:00
erdenezul
b70ffc69df
Merge branch 'master' into bump_pymongo_version_requirement
2019-03-19 08:50:21 +08:00
Paulo Amaral
ba6a37f315
Generate Unique Indices for SortedListField and EmbeddedDocumentListFields
2019-03-18 11:32:53 +00:00
Bastien Gérard
68497542b3
Bump the required version of pymongo to >=3.5
2019-03-17 22:04:19 +01:00
Bastien Gérard
b4fe0b35e4
Merge branch 'master' of github.com:MongoEngine/mongoengine into refactor_deprecated_pymongo_test
2019-03-02 21:48:41 +01:00
Bastien Gérard
35b7efe3f4
refactored deprecated pymongo methods in tests
...
- remove/count/add_user/insert
- added pymongo_support
2019-03-02 00:28:38 +01:00
Bastien Gérard
7cea2a768f
Fix recent flaky test for python 3.6
2019-02-26 22:57:45 +01:00
Bastien Gérard
7247b9b68e
additional fixes to support Mongo3.4
2019-02-26 21:38:23 +01:00
Bastien Gérard
dca837b843
Add suport for Mongo 3.4 (travis, fix tests)
2019-02-26 21:38:23 +01:00
Bastien Gérard
c60c2ee8d0
fix minor styling issue in tests
2019-02-25 22:33:36 +01:00
Bastien Gérard
3cdb5b5db2
fix poor assert's in tests
2019-02-25 22:29:44 +01:00
Bastien Gérard
5bbe782812
fix deprecated call to pymongo save() in tests
2019-02-23 22:37:32 +01:00
Bastien Gérard
c8df3fd2a7
fix conflict
2019-02-21 21:27:08 +01:00
Bastien Gérard
f0a3445250
minor fix for import order
2019-02-18 22:22:20 +01:00
Bastien Gérard
6d353dae1e
refactored iteritems/itervalues to improve 2/3 compat #2003
2019-02-18 22:13:05 +01:00
Bastien Gérard
57a38282a9
Add DeprecationWarning for EmbeddedDocument.save & .reload - those will be removed soon
2019-02-18 22:03:03 +01:00
Bastien Gérard
3484ceabb8
Fix documentation regarding limitation with fields with underscore in their name in DynamicDocument
2019-02-17 09:05:27 +01:00
Trevor Hall
352b23331b
Fix bug #1965 of $position and $push operators do not work with list in an EmbeddedDocument. Set key value to joined parts excluding the index at the end. Added test case
2018-12-05 20:18:48 -06:00
Bastien Gérard
e31558318e
BugFix - _cls not set in constructor #1950
2018-11-13 20:52:39 +01:00
Bastien Gérard
26e2fc8fd4
Merge pull request #1887 from bagerard/fix_changed_fields_issue_same_id_in_nested_doc2
...
Fix bug where an EmbeddedDocument with the same id as its parent would not be tracked for changes
2018-11-01 22:49:07 +01:00
erdenezul
b0148e7860
Merge pull request #1921 from bagerard/error_referencefield_of_abstract_classes
...
Fix a bug when using a ReferenceField(AbstractClass)
2018-10-16 07:55:52 +08:00
Bastien Gérard
59a06a242d
Fix a bug when using a ReferenceField(AbstractClass) #1920
2018-10-15 22:32:11 +02:00
erdenezul
ffe902605d
Merge pull request #1918 from bagerard/improve_error_cant_subclass_document
...
Improve the error message that mentions that Document cant be subclassed
2018-10-15 11:18:13 +08:00
Bastien Gérard
556f7e85fc
Improve the error message that mentions that Document cant be subclassed
2018-10-10 23:13:34 +02:00
Bastien Gérard
9b6c972e0f
renamed decorator needs_mongodb_x in test + fixes ref to mongo 2.4 from travis files
2018-10-02 22:03:55 +02:00
Bastien Gérard
96f0919633
- Fixed tests to allow support of MongoDB 3.2
...
- Replaced MongoDB 2.4 tests in CI by MongoDB 3.2
2018-09-30 21:59:15 +02:00
Bastien Gérard
4314fa883f
improve 2-3 codebase compatibility
2018-09-09 23:32:10 +02: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
erdenezul
7e90571404
Merge pull request #1858 from bagerard/fix_index_creation_error_swallowed
...
Fix index creation error that was swallowed by hasattr under python2
2018-08-30 21:28:38 +08:00
Bastien Gérard
b4860de34d
Fix index creation error that was swallowed by hasattr under python2 ( #1688 )
2018-08-30 10:39:07 +02:00
Bastien Gérard
86548fc7bf
Document the attribute of .from_json
2018-08-28 22:42:51 +02:00
Erdenezul
290b821a3a
add fix for reload(fields) affect changed fields #1371
2018-05-21 16:06:04 +08:00
Erdenezul Batmunkh
e50d66b303
skip mongodb 2.4
2018-05-20 11:26:30 +08:00