Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synced up to 0.8.8 tag, and fixed the import as directed in #1229 #1261

Closed
wants to merge 391 commits into from
Closed
Changes from 3 commits
Commits
Show all changes
391 commits
Select commit Hold shift + click to select a range
3656323
Merge pull request #335 from ryanwitt/patch-2
rozza Jun 3, 2013
b2f78fa
Added test for upsert & update_one #336
rozza Jun 3, 2013
8410d64
Merge pull request #337 from jinzhang273/patch-1
rozza Jun 3, 2013
2128e16
Merge branch 'master' of github.com:MongoEngine/mongoengine
rozza Jun 3, 2013
e7da914
Merge pull request #342 from elasticsales/fix-pickle-loads
rozza Jun 3, 2013
8d2e7b4
Django session ttl index expiry fixed (#329)
rozza Jun 3, 2013
fbc46a5
Updated changelog
rozza Jun 3, 2013
7e6b035
Added hensom to AUTHORS #329
rozza Jun 3, 2013
ceece5a
Improved PIL detection for tests
rozza Jun 3, 2013
4c8dfc3
Fixed Doc.objects(read_preference=X) not setting read preference (#352)
rozza Jun 3, 2013
f1b97fb
Merge pull request #343 from matchbox/dateutil
rozza Jun 4, 2013
5447c6e
DateTimeField now auto converts valid datetime isostrings into dates …
rozza Jun 4, 2013
dcd23a0
Merge pull request #345 from amcgregor/master
rozza Jun 4, 2013
ef4b32a
Merge remote-tracking branch 'origin/pr/346' into 345
rozza Jun 4, 2013
4244e75
Added pre_save_post_validation signal (#345)
rozza Jun 4, 2013
626a336
Removed unused var in _get_changed_fields (#347)
rozza Jun 4, 2013
3b60adc
Merge pull request #344 from matchbox/complex-change-tracking
rozza Jun 4, 2013
f27a536
Updated changelog
rozza Jun 4, 2013
0eafa4a
Merge pull request #341 from ichuang/master
rozza Jun 4, 2013
d94a191
Updated Changelog added test for #341
rozza Jun 4, 2013
0d35e3a
Added debugging for query counter
rozza Jun 4, 2013
985bfd2
Merge remote-tracking branch 'origin/pr/333' into 333
rozza Jun 4, 2013
ee72535
Querysets are now lest restrictive when querying duplicate fields (#3…
rozza Jun 4, 2013
d47134b
Reload forces read preference to be PRIMARY (#355)
rozza Jun 4, 2013
eeb5a83
Added lock when calling doc.Delete() for when signals have no sender …
rozza Jun 4, 2013
74a3fd7
Added queryset delete tests for signals
rozza Jun 4, 2013
eba81e3
dont use $in for _cls queries with a single subclass
wojcikstefan Jun 4, 2013
e1d8c65
Merge pull request #356 from elasticsales/simpler-cls-query
rozza Jun 5, 2013
27e8aa9
Added comment about why temp debugging exists
rozza Jun 5, 2013
c2b1518
Merge branch 'master' of github.com:MongoEngine/mongoengine
rozza Jun 5, 2013
940dfff
Code cleanup
rozza Jun 5, 2013
1a54dad
Filter out index scan for pymongo cache
rozza Jun 5, 2013
ce44843
Doc fix for #340
rozza Jun 5, 2013
a246154
Fixed hashing of EmbeddedDocuments (#348)
rozza Jun 5, 2013
e5648a4
ImageFields now include PIL error messages if invalid error (#353)
rozza Jun 5, 2013
eb1df23
Updated AUTHORS (#340, #348, #353)
rozza Jun 5, 2013
f8904a5
Explicitly set w:1 if None in save
rozza Jun 5, 2013
5cb2812
Reverting Fixed hashing of EmbeddedDocuments (#348)
rozza Jun 5, 2013
c3a065d
Removing old test re: #348
rozza Jun 5, 2013
ea53612
Merge remote-tracking branch 'origin/pr/349' into 349
rozza Jun 6, 2013
ad15781
Fixed amibiguity and differing behaviour regarding field defaults (#349)
rozza Jun 6, 2013
dc3b09c
Improved cascading saves write performance (#361)
rozza Jun 6, 2013
06f5dc6
Docs update
rozza Jun 6, 2013
9f3394d
Added testcase for ListFields with just pks (#361)
rozza Jun 6, 2013
542049f
Trying to fix annoying python-dateutil bug
rozza Jun 6, 2013
8aae4f0
Trying to stabalise the build
rozza Jun 6, 2013
a763122
Fixed Datastructures so instances are a Document or EmbeddedDocument …
rozza Jun 6, 2013
f3af76e
Added ygbourhis to AUTHORS (#363)
rozza Jun 6, 2013
d935b57
apt only had an ancient version of python-dateutil *sigh*
rozza Jun 6, 2013
7451244
Fixed cascading saves which weren't turned off as planned (#291)
rozza Jun 6, 2013
c2928d8
list_indexes and compare_indexes class methods + unit tests
wojcikstefan Jun 7, 2013
305540f
better comment
wojcikstefan Jun 7, 2013
a2457df
make sure to only search for indexes in base classes inheriting from …
wojcikstefan Jun 7, 2013
ba7101f
list_indexes support for multiple inheritance
wojcikstefan Jun 7, 2013
f0d4e76
Documentation updates
rozza Jun 7, 2013
254efdd
Merge remote-tracking branch 'origin/pr/364' into 364
rozza Jun 7, 2013
000eff7
Make test_indexes_and_multiple_inheritance place nice with py3.3 (#364)
rozza Jun 7, 2013
025c16c
Add BobDickinson to authors (#361)
rozza Jun 7, 2013
e2b32b4
Added more docs about compare_indexes (#364)
rozza Jun 7, 2013
a3d43b7
Updated changelog
rozza Jun 7, 2013
ede9fcf
Version bump 0.8.2
rozza Jun 7, 2013
44a2a16
Doc updates
rozza Jun 13, 2013
c31d6a6
Fixed sum and average mapreduce function for issue #375
kelvinhammond Jun 19, 2013
574f3c2
get should clone before calling
rozza Jun 21, 2013
f1a1aa5
Added full_result kwarg to update (#380)
rozza Jun 21, 2013
e116bb9
Fixed queryset.get() respecting no_dereference (#373)
rozza Jun 21, 2013
e6374ab
Added Michael Bartnett to Authors (#373)
rozza Jun 21, 2013
9867e91
Fixed weakref being valid after reload (#374)
rozza Jun 21, 2013
e0d2fab
Merge branch 'master' of https://github.com/MongoEngine/mongoengine
kelvinhammond Jun 21, 2013
d6edef9
Added match ($elemMatch) support for EmbeddedDocuments (#379)
rozza Jun 21, 2013
caff44c
Fixed sum and average queryset function
kelvinhammond Jun 21, 2013
fbe5df8
Remove users post uri test
rozza Jun 25, 2013
8d21e5f
Fix tests for py2.6
rozza Jul 2, 2013
43d6e64
Added a get_proxy_obj method to FileField and handle FileFields in co…
jschrewe Jul 2, 2013
5021b10
Fix crash on Python 3.x and Django >= 1.5
lig Jul 2, 2013
592c654
extending support for queryset.sum and queryset.average methods
wpjunior Jul 5, 2013
aa00dc1
Merge pull request #392 from lig/patch-1
rozza Jul 10, 2013
a1d142d
Prep for django and py3 support
rozza Jul 10, 2013
bc008c2
Merge remote-tracking branch 'origin/pr/392' into 392
rozza Jul 10, 2013
0cb4070
Added Django 1.5 PY3 support (#392)
rozza Jul 10, 2013
7cb46d0
Fixed ListField setslice and delslice dirty tracking (#390)
rozza Jul 10, 2013
f26f1a5
Merge branch 'master' of github.com:MongoEngine/mongoengine
rozza Jul 10, 2013
af86aee
_dynamic field updates - fixed pickling and creation order
rozza Jul 10, 2013
fa83fba
Reload uses shard_key if applicable (#384)
rozza Jul 10, 2013
4209d61
Document.select_related() now respects `db_alias` (#377)
rozza Jul 10, 2013
f34e8a0
Fixed as_pymongo to return the id (#386)
rozza Jul 10, 2013
f4ea1ad
Merge remote-tracking branch 'origin/pr/376'
rozza Jul 10, 2013
8131f0a
Fixed sum and average mapreduce dot notation support (#375, #376)
rozza Jul 10, 2013
daeecef
Update fields.py
wpjunior Jul 10, 2013
9d16364
Merge remote-tracking branch 'origin/pr/391' into 391
rozza Jul 10, 2013
634b874
Added QuerySetNoCache and QuerySet.no_cache() for lower memory consum…
rozza Jul 10, 2013
6e89e73
Merge remote-tracking branch 'origin/pr/393' into 393
rozza Jul 10, 2013
fb0dd2c
Updated changelog
rozza Jul 10, 2013
e28fab0
Merge remote-tracking branch 'origin/pr/400'
rozza Jul 10, 2013
e155e1f
Add a default for previously pickled versions
rozza Jul 10, 2013
1785ced
Merge branch 'master' into 391
rozza Jul 10, 2013
d9f5381
Added get_proxy_object helper to filefields (#391)
rozza Jul 10, 2013
f48a0b7
Trying to fix travis
rozza Jul 10, 2013
6c599ef
Fix edge case where _dynamic_keys stored as None (#387, #401)
rozza Jul 11, 2013
d593f7e
Fixed EmbeddedDocuments with `id` also storing `_id` (#402)
rozza Jul 11, 2013
6c2c33c
Add Jatin- to Authors, changelog update
rozza Jul 11, 2013
7302604
Trying to fix dateutil
rozza Jul 11, 2013
1aa2b86
travis install python-dateutil direct
rozza Jul 11, 2013
48ef176
0.8.3 is a go
rozza Jul 12, 2013
dc5512e
Upgrade warning for 0.8.3
rozza Jul 12, 2013
35f2781
Update changelog
rozza Jul 12, 2013
e44e72b
Merge remote-tracking branch 'upstream/master'
bool-dev Jul 18, 2013
bcf83ec
Corrected spelling mistakes, some grammar, and UUID/DecimalField erro…
bool-dev Jul 18, 2013
80b3df8
dereference instance not thread-safe
Jul 23, 2013
d92ed04
Docs update #406
rozza Jul 23, 2013
a458d5a
Docs update #406
rozza Jul 23, 2013
f22737d
Merge pull request #409 from bool-dev/master
rozza Jul 23, 2013
dae9e66
Create test case for failing saves (wrong delta) with dbref=False
PaulUithol Jul 25, 2013
2ad5ffb
Add asserts to `test_delta_with_dbref_*`, instead of relying on excep…
PaulUithol Jul 25, 2013
e27439b
Fix `BaseDocument._delta` when working with plain ObjectIds instead o…
PaulUithol Jul 25, 2013
d143e50
Replace `assertIn` with an `assertTrue`; apparently missing in Python…
PaulUithol Jul 25, 2013
67f43b2
Allow args and kwargs to be passed through to_json (#420)
rozza Jul 29, 2013
b66cdc8
Merge branch 'master' of github.com:MongoEngine/mongoengine
rozza Jul 29, 2013
7a97d42
to_json test updates #420
rozza Jul 29, 2013
a66d516
Merge pull request #417 from ProgressiveCompany/delta-dbref-false-bug
rozza Jul 29, 2013
93a2adb
Updating changelog and authors #417
rozza Jul 29, 2013
1e4d48d
Don't follow references in _get_changed_fields (#422, #417)
rozza Jul 29, 2013
6efd6fa
Fixed QuerySetNoCache.count() caching (#410)
rozza Jul 30, 2013
f1b1090
Merge remote-tracking branch 'origin/pr/412' into 412
rozza Jul 30, 2013
e98c5e1
Fixed dereference threading issue in ComplexField.__get__ (#412)
rozza Jul 30, 2013
dc310b9
Updated docs about TTL indexes and signals (#413)
rozza Jul 30, 2013
0c43787
Fixed indexing - turn off _cls (#414)
rozza Jul 30, 2013
5e70e1b
Update transform to handle docs erroneously passed to unset (#416)
rozza Jul 30, 2013
a57d9a9
Added regression test (#418)
rozza Jul 30, 2013
b4777f7
Fix test
rozza Jul 30, 2013
c17f944
Add get_user_document and improve mongo_auth module
ncortot Jul 30, 2013
a69db23
Pretty-print GridFSProxy objects
Jul 31, 2013
d8ffa84
Added str representation of GridFSProxy (#424)
rozza Jul 31, 2013
7431b1f
Updated AUTHORS (#424)
rozza Jul 31, 2013
2144159
Merge pull request #423 from ncortot/get_user_document
rozza Jul 31, 2013
719bb53
Updated changelog (#423)
rozza Jul 31, 2013
7ce34ca
Merge branch 'master' of github.com:MongoEngine/mongoengine
rozza Jul 31, 2013
b3f462a
updated docs for django shortcuts get_object_or_404 and get_list_or_404
laurentpayot Aug 1, 2013
a448c9a
removed duplicated method
devoto13 Aug 1, 2013
b98b06f
Fix an error in get_user_document
ncortot Aug 4, 2013
40b0a15
Fixing typos
ncortot Aug 4, 2013
a0d2553
Add a test case for get_user_document
ncortot Aug 4, 2013
f56ad2f
Merge pull request #426 from laurentpayot/Django_shortcuts_docs
rozza Aug 6, 2013
a171005
Merge pull request #428 from devoto13/patch-1
rozza Aug 6, 2013
88ca0f8
Merge remote-tracking branch 'origin/pr/432'
rozza Aug 6, 2013
4731105
Merge branch 'master' of github.com:MongoEngine/mongoengine
rozza Aug 6, 2013
5bcc454
Handle dynamic fieldnames that look like digits (#434)
rozza Aug 7, 2013
f30208f
Fix the ._get_db() attribute after a Document.switch_db()
Karmak23 Aug 12, 2013
70b3206
permit the establishment of a field with the name of size or other
crazyzubr Aug 15, 2013
3622ebf
Merge pull request #441 from Karmak23/patch-1
rozza Aug 20, 2013
d07a9d2
Dynamic Fields store and recompose Embedded Documents / Documents cor…
rozza Aug 20, 2013
02fc41f
Merge branch 'master' of github.com:MongoEngine/mongoengine
rozza Aug 20, 2013
ee7666d
Update AUTHORS and Changelog (#441)
rozza Aug 20, 2013
67baf46
Fixed slice when using inheritance causing fields to be excluded (#437)
rozza Aug 20, 2013
49f5b4f
Fix Queryset docs (#448)
rozza Aug 20, 2013
2cd722d
Updated setup.py
rozza Aug 20, 2013
661398d
Fixed dereference issue with embedded listfield referencefields (#439)
rozza Aug 20, 2013
29c887f
Updated field filter logic - can now exclude subclass fields (#443)
rozza Aug 20, 2013
8a31713
Merge remote-tracking branch 'origin/pr/445'
rozza Aug 20, 2013
a707598
Allow fields to be named the same as query operators (#445)
rozza Aug 20, 2013
0dd01bd
Fixed "$pull" semantics for nested ListFields (#447)
rozza Aug 20, 2013
a0ef649
Update travis.yml
rozza Aug 20, 2013
200e52b
Added documentation about abstract meta
rozza Aug 20, 2013
fffd0e8
Fixed error raise
rozza Aug 20, 2013
f57569f
Remove database name necessity in uri connection schema
Aug 21, 2013
9ee3b79
Merge pull request #452 from LK4D4/master
rozza Aug 23, 2013
f4db0da
Update changelog add LK4D4 to authors (#452)
rozza Aug 23, 2013
23843ec
Updated travis config
rozza Aug 23, 2013
6738a94
Updated travis
rozza Aug 23, 2013
86c8929
0.8.4 is a go
rozza Aug 23, 2013
bcbe740
Updated setup.py
rozza Aug 23, 2013
168ecd6
Fixes #458, DecimalField now ignores incorrect values until validate …
bool-dev Sep 6, 2013
2f9964e
Expanded example of using ListFields for one-to-many relationships.
adamsc64 Sep 17, 2013
89785da
fix validation for a nested DictField
wojcikstefan Sep 17, 2013
654cca8
Fixes AttributeError when using storage.exists() on a non-existing file.
jyapayne Sep 18, 2013
66d9182
fix broken external docs link
swistakm Sep 20, 2013
0b6ab49
Merge pull request #472 from swistakm/fix/docs-map-reduce-mongodb.org…
rozza Sep 27, 2013
6f808bd
Merge pull request #469 from jyapayne/master
rozza Sep 27, 2013
e146262
Merge pull request #467 from adamsc64/doc_foreignkey_push_pull_example
rozza Sep 27, 2013
7fc45fb
Merge pull request #468 from elasticsales/fix-dict-validation
rozza Sep 27, 2013
1145c72
Merge pull request #462 from bool-dev/master
rozza Sep 27, 2013
c8a33b8
fix(session): session serializer to json
Sep 29, 2013
7c254c6
Use defaults when host and port are passed as None
Oct 4, 2013
a2dd8cb
Added app_label Meta attribute to MongoUser class
danielward Oct 5, 2013
eb975d7
Added entry to AUTHORS
danielward Oct 5, 2013
ebf7056
Test for testing invalid dict field value.
mitar Oct 6, 2013
fc4b247
Patch for #491
naftulikay Oct 14, 2013
1978dc8
Added regression test for bug with DictField and numeric keys.
Oct 17, 2013
9ed138f
Fixed bug with numeric valuedict keys and BaseDocument._lookup_field().
Oct 17, 2013
27b8467
Fixed bug for count method when _none is True
woakas Oct 17, 2013
f2c25b4
Error in GenericReferenceField serialization was fixed
Oct 20, 2013
11d4f64
Python 2.5-2.6 compatibility fix
Oct 20, 2013
c18f8c9
added BSONSerializer
j0hnsmith Nov 11, 2013
02dbe40
Merge pull request #480 from mishudark/master
rozza Nov 29, 2013
dfe8987
Updated geo tests
rozza Nov 29, 2013
4df12be
Merge branch 'master' of github.com:MongoEngine/mongoengine
rozza Nov 29, 2013
7c93871
Updates to docs ref: #454, #480
rozza Nov 29, 2013
48a5679
Added Django 1.6 to travis Refs: #480, #454
rozza Nov 29, 2013
c28d913
Fixed distinct casting issue with ListField of EmbeddedDocuments (#470)
rozza Nov 29, 2013
237469c
Merge pull request #483 from grampajoe/connection-defaults
rozza Nov 29, 2013
d79a5ec
Updated Authors and changelog (#483)
rozza Nov 29, 2013
809473c
Merge branch 'master' of github.com:MongoEngine/mongoengine
rozza Nov 29, 2013
992c91d
Merge remote-tracking branch 'origin/pr/484'
rozza Nov 29, 2013
3a3b96e
Merge remote-tracking branch 'origin/pr/485'
rozza Nov 29, 2013
6465726
Fix handling invalid dict field value (#485)
rozza Nov 29, 2013
6db59a9
Fix setting Geo Location fields (#488)
rozza Nov 29, 2013
499e11f
Updated AUTHORS (#488)
rozza Nov 29, 2013
d902a74
Merge remote-tracking branch 'origin/pr/492'
rozza Nov 29, 2013
855efe7
Added user_permissions to Django User object (#491, #492)
rozza Nov 29, 2013
954131b
Merge remote-tracking branch 'origin/pr/496'
rozza Nov 29, 2013
06caabf
Import fix
rozza Nov 29, 2013
60ceeb0
Update change log and Authors (#496)
rozza Nov 29, 2013
6925344
Test updates
rozza Nov 29, 2013
7200a8c
Merge pull request #498 from woakas/patch-1
rozza Nov 29, 2013
bcbbbe4
Added test, updated AUTHORS and changelog (#498)
rozza Nov 29, 2013
8dcd998
Merge pull request #499 from drudim/master
rozza Nov 29, 2013
bb56f92
Updated changelog and AUTHORS (#499)
rozza Nov 29, 2013
a2a698a
Fixed EmbeddedDocument with ReferenceField equality issue (#502)
rozza Nov 29, 2013
b024dd9
EmbeddedDocument._instance is now set when settng the attribute (#506)
rozza Nov 29, 2013
fe83406
Merge pull request #509 from j0hnsmith/bson_serializer
rozza Nov 29, 2013
453024c
Django 1.6 session fix (#509)
rozza Nov 29, 2013
c074f4d
Django 1.6 login fix (#522)
rozza Nov 29, 2013
d868cfd
Fix multi level nested fields getting marked as changed (#523)
rozza Nov 29, 2013
16dcf78
Ensure id is Hashable
rozza Dec 2, 2013
d1b30f4
Fix auth to use `get_user_document` #527
rozza Dec 4, 2013
7a73a92
Update changelog
rozza Dec 4, 2013
57ac38d
Version bump 0.8.5
rozza Dec 4, 2013
d1b86fd
Fix for import
rozza Dec 4, 2013
6a02ac7
Fix django auth import (#531)
rozza Dec 4, 2013
f7302f7
Reject email addresses where hostname ends with '.'
Dec 5, 2013
d2941a9
Updated doc examples to open using read binary mode
rozza Dec 13, 2013
516591f
Docs update and canonical url fix
rozza Dec 13, 2013
a02c820
Merge pull request #534 from matthewowen/master
rozza Dec 18, 2013
c5cc4b7
Updated docs
rozza Jan 13, 2014
4911545
Merge branch 'master' of github.com:MongoEngine/mongoengine
rozza Jan 13, 2014
1b62dd5
Fix duplicate error check
rozza Jan 14, 2014
708dbac
Depending on pymongo it might raise a TypeError or ValueError
rozza Jan 14, 2014
7914cd4
Fix typo in upgrade docs
davidwilemski Jan 18, 2014
63ebb69
geo_within docs - fix broken code samples
yprez Jan 22, 2014
ed22af4
Merge pull request #553 from davidwilemski/patch-2
rozza Jan 24, 2014
7affa5a
Merge pull request #554 from yprez/patch-1
rozza Jan 24, 2014
0277062
Stop ensure_indexes running on a secondaries (#555)
rozza Jan 24, 2014
a839bd4
Merge branch 'master' of github.com:MongoEngine/mongoengine
rozza Jan 24, 2014
0e5a066
Fixed possible issue not catching duplicate key errors
rozza Jan 24, 2014
bc08bea
Fix circular import issue with django auth (#531) (#545)
rozza Jan 24, 2014
6d5e7d9
Calling reload on deleted / nonexistant documents raises DoesNotExist…
rozza Jan 24, 2014
0da694b
0.8.7
rozza Jan 24, 2014
5a8a15f
Updated version to 0.8.8
rozza Apr 8, 2015
80c4771
Synced up to 0.8.8 tag, and fixed the import as directed in #1229
apolkosnik-old Mar 23, 2016
9c0b913
I meant ImportError not Exception :)
apolkosnik-old Mar 23, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mongoengine/fields.py
Original file line number Diff line number Diff line change
@@ -153,7 +153,7 @@ class EmailField(StringField):
EMAIL_REGEX = re.compile(
r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*" # dot-atom
r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*"' # quoted-string
r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,253}[A-Z0-9])?\.)+[A-Z]{2,6}\.?$', re.IGNORECASE # domain
r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,253}[A-Z0-9])?\.)+[A-Z]{2,6}$', re.IGNORECASE # domain
)

def validate(self, value):
10 changes: 8 additions & 2 deletions tests/fields/fields.py
Original file line number Diff line number Diff line change
@@ -2499,6 +2499,9 @@ class User(Document):
user = User(email="[email protected]")
self.assertTrue(user.validate() is None)

user = User(email="[email protected]")
self.assertTrue(user.validate() is None)

user = User(email=("Kofq@rhom0e4klgauOhpbpNdogawnyIKvQS0wk2mjqrgGQ5S"
"ucictfqpdkK9iS1zeFw8sg7s7cwAF7suIfUfeyueLpfosjn3"
"aJIazqqWkm7.net"))
@@ -2507,6 +2510,9 @@ class User(Document):
user = User(email='me@localhost')
self.assertRaises(ValidationError, user.validate)

user = User(email="[email protected].")
self.assertRaises(ValidationError, user.validate)

def test_email_field_honors_regex(self):
class User(Document):
email = EmailField(regex=r'\[email protected]')
@@ -2594,13 +2600,13 @@ class Doc(Document):
def test_invalid_dict_value(self):
class DictFieldTest(Document):
dictionary = DictField(required=True)

DictFieldTest.drop_collection()

test = DictFieldTest(dictionary=None)
test.dictionary # Just access to test getter
self.assertRaises(ValidationError, test.validate)

test = DictFieldTest(dictionary=False)
test.dictionary # Just access to test getter
self.assertRaises(ValidationError, test.validate)