Skip to content

Commit

Permalink
Merge pull request #296 from UW-GAC/maint/clean-up-test-warnings
Browse files Browse the repository at this point in the history
Clean up test warnings
  • Loading branch information
amstilp authored Nov 20, 2023
2 parents 1f102ae + 96261d3 commit fac1db5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions primed/cdsa/tests/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,4 @@ def authorization_domains(self, create, extracted, **kwargs):

class Meta:
model = models.CDSAWorkspace
skip_postgeneration_save = True
2 changes: 1 addition & 1 deletion primed/cdsa/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions primed/dbgap/tests/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def studies(self, create, extracted, **kwargs):

class Meta:
model = models.dbGaPStudyAccession
skip_postgeneration_save = True


class dbGaPWorkspaceFactory(TimeStampedModelFactory, DjangoModelFactory):
Expand All @@ -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):
Expand Down
2 changes: 2 additions & 0 deletions primed/users/tests/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit fac1db5

Please sign in to comment.