Updated recent bugfix with embedded DOc deepcopy so that it set _instance to None

This commit is contained in:
Bastien Gerard
2021-08-02 21:51:15 +02:00
parent c32b308730
commit 5a41998eda
4 changed files with 34 additions and 11 deletions

View File

@@ -3,7 +3,6 @@ import pickle
import unittest
import uuid
import weakref
from copy import deepcopy
from datetime import datetime
import bson
@@ -79,14 +78,6 @@ class TestDocumentInstance(MongoDBTestCase):
else:
assert field._instance == instance
def test_deepcopy(self):
"""Ensure that the _instance attribute on EmbeddedDocument exists after a deepcopy"""
doc = self.Job()
assert doc._instance is None
copied = deepcopy(doc)
assert copied._instance is None
def test_capped_collection(self):
"""Ensure that capped collections work properly."""