SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 6ebb224a authored by Geert Kapteijns's avatar Geert Kapteijns
Browse files

Add VettingEditorFactory

parent 3fb32b6d
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,14 @@ class ContributorFactory(factory.django.DjangoModelFactory):
vetted_by = factory.SubFactory('scipost.factories.ContributorFactory', vetted_by=None)
class VettingEditorFactory(ContributorFactory):
@factory.post_generation
def add_to_vetting_editors(self, create, extracted, **kwargs):
if not create:
return
self.user.groups.add(Group.objects.get(name="Vetting Editors"))
class UserFactory(factory.django.DjangoModelFactory):
class Meta:
model = get_user_model()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment