Commit Graph
10 Commits
Author SHA1 Message Date
RikandWilson Júnior 80f80cd31f fixed more tests that were using undefined model fields 2014-11-29 23:20:31 -02:00
RikandWilson Júnior 79705fbf11 moved initialization of _created before FieldDoesNotExist check
Because otherwise we'll get a FieldDoesNotExist error on the field
_created.
2014-11-29 23:20:30 -02:00
RikandWilson Júnior 191a4e569e added ints in string.format() for 2.6 compability 2014-11-29 23:20:30 -02:00
RikandWilson Júnior 1cac35be03 using python 2.6 compatible way of assertRaises 2014-11-29 23:20:30 -02:00
RikandWilson Júnior 6d48100f44 add test if FieldDoesNotExist is raised
When trying to set an undefined field.
2014-11-29 23:20:30 -02:00
RikandWilson Júnior 4627af3e90 add FieldDoesNotExist exception to __all__
So it will be available when you do:
    from mongoengine import *
2014-11-29 23:20:30 -02:00
RikandWilson Júnior 913952ffe1 remove unittest test_no_overwritting_no_data_loss
Now that fields need to be defined explicitly, it's not possible to have
another property with the same name on a model.
https://github.com/MongoEngine/mongoengine/pull/457#issuecomment-47513105
2014-11-29 23:20:30 -02:00
RikandWilson Júnior 67bf6afc89 fixed tests that were using undefined model fields 2014-11-29 23:20:30 -02:00
RikandWilson Júnior 06064decd2 check for dynamic document, exclude id pk and _cls 2014-11-29 23:20:30 -02:00
RikandWilson Júnior 4cca9f17df Check if undefined fields are supplied on document
If an undefined field is supplied to a document instance, a
`FieldDoesNotExist` Exception will be raised.
2014-11-29 23:20:30 -02:00