codingjoe/django-stdimage

Django 3.2 setUpTestData uses copy.deepcopy()

Closed this issue · 3 comments

Using setUpTestData() with django-stdimage in Django 3.2 does not work anymore, as it look like copy.deepcopy() is not supported with django-stdimage.

Changed in Django 3.2:
Objects assigned to class attributes in setUpTestData() must support creating deep copies with copy.deepcopy() in order to > isolate them from alterations performed by each test methods. In previous versions of Django these objects were reused > and changes made to them were persisted between test methods.

Hi @vchrisb,

Thanks for reaching out and good find. Would you be interested in providing a patch? I be delighted to review it.

Best,
Joe

I'll see what I can do. 👍

I am facing similar issue with django32 tests cases. Is there any plan for patch ?

https://docs.djangoproject.com/en/3.2/releases/3.2/#tests