introduce new app domains
- generate domains app - duplicate managemails.models.MailDomain as domains.models.MailDomain - add domains app to gnuviechadmin.settings.base.LOCAL_APPS - repair managemails.tests.test_models - fix handling of empty results in osusers.models.GroupManager.get_next_gid and osusers.models.UserManager.get_next_uid
This commit is contained in:
parent
e132c9a56c
commit
5db6223bc0
11 changed files with 76 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
from django.test import TestCase
|
||||
from passlib.hash import sha512_crypt
|
||||
|
||||
from osusers.models import User
|
||||
from managemails.models import (
|
||||
MailAddress,
|
||||
MailDomain,
|
||||
|
@ -16,7 +17,8 @@ class MailDomainTest(TestCase):
|
|||
|
||||
class MailboxTest(TestCase):
|
||||
def test_set_password(self):
|
||||
mb = Mailbox.objects.create(username='test', uid=1000, gid=1000)
|
||||
user = User.objects.create_user()
|
||||
mb = Mailbox.objects.create(username='test', osuser=user)
|
||||
mb.set_password('test')
|
||||
self.assertTrue(sha512_crypt.verify('test', mb.password))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue