first import

first import between version 0.1.3 and 0.2

darcs-hash:20051127110300-684f5-0ed50cd0e86df9195cec2c1df070fdf24a6faeb5.gz
This commit is contained in:
dax
2005-11-27 12:03:00 +01:00
commit 9fa2df5563
27 changed files with 4351 additions and 0 deletions

72
tests/test_x.py Normal file
View File

@@ -0,0 +1,72 @@
##
## test_x.py
## Login : <adro8400@claralinux>
## Started on Fri May 20 10:46:58 2005 adro8400
## $Id: test_x.py,v 1.1 2005/07/11 20:39:31 dax Exp $
##
## Copyright (C) 2005 adro8400
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
import unittest
from jabber.x import *
class X_TestCase(unittest.TestCase):
def setUp(self):
self.mail_component = MailComponent()
def test_get_form(self):
self.reg_form.add_field(type = "text-single", \
label = "Connection name", \
var = "name")
self.reg_form.add_field(type = "text-single", \
label = "Login", \
var = "login")
self.reg_form.add_field(type = "text-private", \
label = "password", \
var = "password")
self.reg_form.add_field(type = "text-single", \
label = "Host", \
var = "host")
self.reg_form.add_field(type = "text-single", \
label = "Port", \
var = "port")
field = self.reg_form.add_field(type = "list-single", \
label = "Mailbox type", \
var = "type")
field.add_option(label = "POP3", \
value = "pop3")
field.add_option(label = "POP3S", \
value = "pop3s")
field.add_option(label = "IMAP", \
value = "imap")
field.add_option(label = "IMAPS", \
value = "imaps")
self.reg_form.add_field(type = "text-single", \
label = "Mailbox (IMAP)", \
var = "mailbox", \
value = "INBOX")
self.reg_form.add_field(type = "boolean", \
label = "Retrieve mail", \
var = "retrieve")
pass