def setUp(self):
    'Connect with a simpler user.'
    patcher = mock.patch('imaplib.IMAP4')
    self.mock_imap4 = patcher.start()
    self.mock_imap4.return_value = IMAP4Mock()
    self.addCleanup(patcher.stop)
    self.set_global_parameter('imap_port', 1435)
    self.workdir = tempfile.mkdtemp()
    os.mkdir('{}/webmail'.format(self.workdir))
    self.set_global_parameter('update_scheme', False, app='core')
    url = reverse('core:login')
    data = {'username': self.user.username, 'password': 'toto'}
    self.client.post(url, data)
Connect with a simpler user.
def setUp(self):
    
    patcher = mock.patch('imaplib.IMAP4')
    self.mock_imap4 = patcher.start()
    self.mock_imap4.return_value = IMAP4Mock()
    self.addCleanup(patcher.stop)
    self.set_global_parameter('imap_port', 1435)
    self.workdir = tempfile.mkdtemp()
    os.mkdir('{}/webmail'.format(self.workdir))
    self.set_global_parameter('update_scheme', False, app='core')
    url = reverse('core:login')
    data = {'username': self.user.username, 'password': 'toto'}
    self.client.post(url, data)