diff --git a/primed/cdsa/tests/factories.py b/primed/cdsa/tests/factories.py index bf0459b8..e71482ef 100644 --- a/primed/cdsa/tests/factories.py +++ b/primed/cdsa/tests/factories.py @@ -126,3 +126,4 @@ def authorization_domains(self, create, extracted, **kwargs): class Meta: model = models.CDSAWorkspace + skip_postgeneration_save = True diff --git a/primed/cdsa/views.py b/primed/cdsa/views.py index 952804a7..c48f5e75 100644 --- a/primed/cdsa/views.py +++ b/primed/cdsa/views.py @@ -15,7 +15,7 @@ from django.forms import inlineformset_factory from django.http import Http404, HttpResponseRedirect from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views.generic import DetailView, FormView, TemplateView, UpdateView from django_tables2 import MultiTableMixin, SingleTableMixin, SingleTableView diff --git a/primed/dbgap/tests/factories.py b/primed/dbgap/tests/factories.py index de6f3e98..02f9bbd8 100644 --- a/primed/dbgap/tests/factories.py +++ b/primed/dbgap/tests/factories.py @@ -61,6 +61,7 @@ def studies(self, create, extracted, **kwargs): class Meta: model = models.dbGaPStudyAccession + skip_postgeneration_save = True class dbGaPWorkspaceFactory(TimeStampedModelFactory, DjangoModelFactory): @@ -78,6 +79,7 @@ class dbGaPWorkspaceFactory(TimeStampedModelFactory, DjangoModelFactory): class Meta: model = models.dbGaPWorkspace + skip_postgeneration_save = True @post_generation def authorization_domains(self, create, extracted, **kwargs): diff --git a/primed/users/tests/factories.py b/primed/users/tests/factories.py index 9fc0a2ee..6a0e0384 100644 --- a/primed/users/tests/factories.py +++ b/primed/users/tests/factories.py @@ -27,10 +27,12 @@ def password(self, create: bool, extracted: Sequence[Any], **kwargs): ).evaluate(None, None, extra={"locale": None}) ) self.set_password(password) + self.save() class Meta: model = get_user_model() django_get_or_create = ["username"] + skip_postgeneration_save = True class GroupFactory(DjangoModelFactory):