# HG changeset patch # User Richard Jones # Date 1080109139 0 # Node ID b7404a96b58ac74bad85c1c1940f5e4a46b2e8ef # Parent 12a902ea1dcd416fa62e4353d76fab5419c5eada minor pre-release / test fixes diff -r 12a902ea1dcd -r b7404a96b58a MANIFEST.in --- a/MANIFEST.in Wed Mar 24 05:56:49 2004 +0000 +++ b/MANIFEST.in Wed Mar 24 06:18:59 2004 +0000 @@ -8,7 +8,7 @@ recursive-include detectors *.py recursive-include templates *.* home* page* global-exclude .cvsignore *.pyc *.pyo -include run_tests *.txt demo.py +include run_tests.py *.txt demo.py exclude BUILD.txt I18N_PROGRESS.txt TODO.txt exclude doc/security.txt doc/templating.txt diff -r 12a902ea1dcd -r b7404a96b58a roundup/backends/back_postgresql.py --- a/roundup/backends/back_postgresql.py Wed Mar 24 05:56:49 2004 +0000 +++ b/roundup/backends/back_postgresql.py Wed Mar 24 06:18:59 2004 +0000 @@ -8,7 +8,6 @@ '''Postgresql backend via psycopg for Roundup.''' __docformat__ = 'restructuredtext' - import os, shutil, popen2, time import psycopg diff -r 12a902ea1dcd -r b7404a96b58a roundup/cgi/actions.py --- a/roundup/cgi/actions.py Wed Mar 24 05:56:49 2004 +0000 +++ b/roundup/cgi/actions.py Wed Mar 24 06:18:59 2004 +0000 @@ -499,7 +499,7 @@ ''' # parse the props from the form try: - props, links = self.client.parsePropsFromForm(create=True) + props, links = self.client.parsePropsFromForm(create=1) except (ValueError, KeyError), message: self.client.error_message.append(_('Error: ') + str(message)) return @@ -671,7 +671,7 @@ Return 1 on successful login. """ - props = self.client.parsePropsFromForm(create=True)[0][('user', None)] + props = self.client.parsePropsFromForm(create=1)[0][('user', None)] # registration isn't allowed to supply roles if props.has_key('roles'): diff -r 12a902ea1dcd -r b7404a96b58a roundup/cgi/client.py --- a/roundup/cgi/client.py Wed Mar 24 05:56:49 2004 +0000 +++ b/roundup/cgi/client.py Wed Mar 24 06:18:59 2004 +0000 @@ -1,4 +1,4 @@ -# $Id: client.py,v 1.166 2004-03-18 01:58:46 richard Exp $ +# $Id: client.py,v 1.167 2004-03-24 06:18:59 richard Exp $ """WWW request handler (also used in the stand-alone server). """ @@ -650,6 +650,6 @@ except MessageSendError, e: self.error_message.append(str(e)) - def parsePropsFromForm(self, create=False): + def parsePropsFromForm(self, create=0): return FormParser(self).parse(create=create) diff -r 12a902ea1dcd -r b7404a96b58a roundup/cgi/form_parser.py --- a/roundup/cgi/form_parser.py Wed Mar 24 05:56:49 2004 +0000 +++ b/roundup/cgi/form_parser.py Wed Mar 24 06:18:59 2004 +0000 @@ -34,7 +34,7 @@ self.classname = client.classname self.nodeid = client.nodeid - def parse(self, create=False, num_re=re.compile('^\d+$')): + def parse(self, create=0, num_re=re.compile('^\d+$')): """ Item properties and their values are edited with html FORM variables and their values. You can: diff -r 12a902ea1dcd -r b7404a96b58a test/test_mysql.py --- a/test/test_mysql.py Wed Mar 24 05:56:49 2004 +0000 +++ b/test/test_mysql.py Wed Mar 24 06:18:59 2004 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: test_mysql.py,v 1.8 2004-03-18 01:58:46 richard Exp $ +# $Id: test_mysql.py,v 1.9 2004-03-24 06:18:59 richard Exp $ import unittest, os, shutil, time, imp @@ -90,6 +90,7 @@ def test_suite(): suite = unittest.TestSuite() if not hasattr(backends, 'mysql'): + print "Skipping mysql tests" return suite from roundup.backends import mysql diff -r 12a902ea1dcd -r b7404a96b58a test/test_postgresql.py --- a/test/test_postgresql.py Wed Mar 24 05:56:49 2004 +0000 +++ b/test/test_postgresql.py Wed Mar 24 06:18:59 2004 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: test_postgresql.py,v 1.6 2004-03-18 01:58:46 richard Exp $ +# $Id: test_postgresql.py,v 1.7 2004-03-24 06:18:59 richard Exp $ import unittest @@ -28,13 +28,13 @@ config.POSTGRESQL_DATABASE = {'database': 'rounduptest'} from roundup import backends -from roundup.backends.back_postgresql import db_nuke, db_create, db_exists class postgresqlOpener: if hasattr(backends, 'postgresql'): from roundup.backends import postgresql as module def setUp(self): + #from roundup.backends.back_postgresql import db_nuke #db_nuke(config, 1) pass @@ -43,6 +43,7 @@ def nuke_database(self): # clear out the database - easiest way is to nuke and re-create it + from roundup.backends.back_postgresql import db_nuke db_nuke(config) class postgresqlDBTest(postgresqlOpener, DBTest): @@ -104,9 +105,11 @@ def test_suite(): suite = unittest.TestSuite() if not hasattr(backends, 'postgresql'): + print "Skipping mysql tests" return suite # make sure we start with a clean slate + from roundup.backends.back_postgresql import db_nuke db_nuke(config, 1) # TODO: Check if we can run postgresql tests