Skip to content

Commit b718bdd

Browse files
author
Richard Jones
committed
minor pre-release / test fixes
1 parent e4f82f2 commit b718bdd

File tree

7 files changed

+13
-10
lines changed

7 files changed

+13
-10
lines changed

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ recursive-include doc *.html *.png *.txt *.css *.1
88
recursive-include detectors *.py
99
recursive-include templates *.* home* page*
1010
global-exclude .cvsignore *.pyc *.pyo
11-
include run_tests *.txt demo.py
11+
include run_tests.py *.txt demo.py
1212
exclude BUILD.txt I18N_PROGRESS.txt TODO.txt
1313
exclude doc/security.txt doc/templating.txt
1414

roundup/backends/back_postgresql.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
'''Postgresql backend via psycopg for Roundup.'''
99
__docformat__ = 'restructuredtext'
1010

11-
1211
import os, shutil, popen2, time
1312
import psycopg
1413

roundup/cgi/actions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ def handle(self):
499499
'''
500500
# parse the props from the form
501501
try:
502-
props, links = self.client.parsePropsFromForm(create=True)
502+
props, links = self.client.parsePropsFromForm(create=1)
503503
except (ValueError, KeyError), message:
504504
self.client.error_message.append(_('Error: ') + str(message))
505505
return
@@ -671,7 +671,7 @@ def handle(self):
671671
672672
Return 1 on successful login.
673673
"""
674-
props = self.client.parsePropsFromForm(create=True)[0][('user', None)]
674+
props = self.client.parsePropsFromForm(create=1)[0][('user', None)]
675675

676676
# registration isn't allowed to supply roles
677677
if props.has_key('roles'):

roundup/cgi/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.166 2004-03-18 01:58:46 richard Exp $
1+
# $Id: client.py,v 1.167 2004-03-24 06:18:59 richard Exp $
22

33
"""WWW request handler (also used in the stand-alone server).
44
"""
@@ -650,6 +650,6 @@ def standard_message(self, to, subject, body, author=None):
650650
except MessageSendError, e:
651651
self.error_message.append(str(e))
652652

653-
def parsePropsFromForm(self, create=False):
653+
def parsePropsFromForm(self, create=0):
654654
return FormParser(self).parse(create=create)
655655

roundup/cgi/form_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(self, client):
3434
self.classname = client.classname
3535
self.nodeid = client.nodeid
3636

37-
def parse(self, create=False, num_re=re.compile('^\d+$')):
37+
def parse(self, create=0, num_re=re.compile('^\d+$')):
3838
""" Item properties and their values are edited with html FORM
3939
variables and their values. You can:
4040

test/test_mysql.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: test_mysql.py,v 1.8 2004-03-18 01:58:46 richard Exp $
18+
# $Id: test_mysql.py,v 1.9 2004-03-24 06:18:59 richard Exp $
1919

2020
import unittest, os, shutil, time, imp
2121

@@ -90,6 +90,7 @@ def tearDown(self):
9090
def test_suite():
9191
suite = unittest.TestSuite()
9292
if not hasattr(backends, 'mysql'):
93+
print "Skipping mysql tests"
9394
return suite
9495

9596
from roundup.backends import mysql

test/test_postgresql.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: test_postgresql.py,v 1.6 2004-03-18 01:58:46 richard Exp $
18+
# $Id: test_postgresql.py,v 1.7 2004-03-24 06:18:59 richard Exp $
1919

2020
import unittest
2121

@@ -28,13 +28,13 @@
2828
config.POSTGRESQL_DATABASE = {'database': 'rounduptest'}
2929

3030
from roundup import backends
31-
from roundup.backends.back_postgresql import db_nuke, db_create, db_exists
3231

3332
class postgresqlOpener:
3433
if hasattr(backends, 'postgresql'):
3534
from roundup.backends import postgresql as module
3635

3736
def setUp(self):
37+
#from roundup.backends.back_postgresql import db_nuke
3838
#db_nuke(config, 1)
3939
pass
4040

@@ -43,6 +43,7 @@ def tearDown(self):
4343

4444
def nuke_database(self):
4545
# clear out the database - easiest way is to nuke and re-create it
46+
from roundup.backends.back_postgresql import db_nuke
4647
db_nuke(config)
4748

4849
class postgresqlDBTest(postgresqlOpener, DBTest):
@@ -104,9 +105,11 @@ def tearDown(self):
104105
def test_suite():
105106
suite = unittest.TestSuite()
106107
if not hasattr(backends, 'postgresql'):
108+
print "Skipping mysql tests"
107109
return suite
108110

109111
# make sure we start with a clean slate
112+
from roundup.backends.back_postgresql import db_nuke
110113
db_nuke(config, 1)
111114

112115
# TODO: Check if we can run postgresql tests

0 commit comments

Comments
 (0)