check both NotUniqueError and OperationError in tests

Seems mongoengine changed its exception type, when try to save a
duplicate key, it will raise OperationError, not NotUniqueError,
so check both of the two exceptions, or py.test will fail.
Merge pull request #89 from yupeng820921/pytest

check both NotUniqueError and OperationError in tests