forked from DGNum/gestioCOF
Use the syncmail command as defined in custommail
This commit is contained in:
parent
26b19685b8
commit
9da9649a45
3 changed files with 13 additions and 93 deletions
|
@ -1,8 +1,10 @@
|
|||
import csv
|
||||
import os
|
||||
import uuid
|
||||
from datetime import timedelta
|
||||
|
||||
from custommail.models import CustomMail
|
||||
from django.conf import settings
|
||||
from django.contrib import messages
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.contrib.messages.api import get_messages
|
||||
|
@ -32,7 +34,10 @@ class RegistrationViewTests(ViewTestCaseMixin, TestCase):
|
|||
auth_forbidden = [None, "user", "member"]
|
||||
|
||||
def requires_mails(self):
|
||||
call_command("syncmails", verbosity=0)
|
||||
data_file = os.path.join(
|
||||
settings.BASE_DIR, "gestioncof", "management", "data", "custommail.json"
|
||||
)
|
||||
call_command("syncmails", data_file, verbosity=0)
|
||||
|
||||
def test_get(self):
|
||||
r = self.client.get(self.url)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue