summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: de5b24a)
raw | patch | inline | side by side (parent: de5b24a)
author | jlgijsbers <jlgijsbers@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 5 Nov 2003 21:54:57 +0000 (21:54 +0000) | ||
committer | jlgijsbers <jlgijsbers@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Wed, 5 Nov 2003 21:54:57 +0000 (21:54 +0000) |
to the config file for testCreation.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1967 57a73879-2fb5-44c3-a270-3262357dd7e2
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1967 57a73879-2fb5-44c3-a270-3262357dd7e2
test/db_test_base.py | patch | blob | history | |
test/test_mysql.py | patch | blob | history |
diff --git a/test/db_test_base.py b/test/db_test_base.py
index 655bf49ef085f41673a40fe0f81b49660761916f..0e0b45c2144c5bec95334512103f8e303a1b18e2 100644 (file)
--- a/test/db_test_base.py
+++ b/test/db_test_base.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: db_test_base.py,v 1.3 2003-11-05 01:38:52 richard Exp $
+# $Id: db_test_base.py,v 1.4 2003-11-05 21:54:57 jlgijsbers Exp $
import unittest, os, shutil, errno, imp, sys, time
# create the instance
init.install(self.dirname, 'templates/classic')
init.write_select_db(self.dirname, self.backend)
+
+ if self.extra_config:
+ f = open(os.path.join(self.dirname, 'config.py'), 'a')
+ try:
+ f.write(self.extra_config)
+ finally:
+ f.close()
+
init.initialise(self.dirname, 'sekrit')
# check we can load the package
diff --git a/test/test_mysql.py b/test/test_mysql.py
index 5825ff3050078e8d926362a89e46d10d926d8cf1..fe045f6bdd55d74070fb5f3e3b7175a01897c1de 100644 (file)
--- a/test/test_mysql.py
+++ b/test/test_mysql.py
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#
-# $Id: test_mysql.py,v 1.3 2003-11-02 08:44:17 richard Exp $
+# $Id: test_mysql.py,v 1.4 2003-11-05 21:54:57 jlgijsbers Exp $
import unittest, os, shutil, time, imp
class mysqlClassicInitTest(ClassicInitTest):
backend = 'mysql'
-
- def testCreation(self):
- ae = self.assertEqual
-
- # create the instance
- init.install(self.dirname, 'templates/classic')
- init.write_select_db(self.dirname, self.backend)
- f = open(os.path.join(self.dirname, 'config.py'), 'a')
- try:
- f.write('''
+ extra_config = '''
MYSQL_DBHOST = 'localhost'
MYSQL_DBUSER = 'rounduptest'
MYSQL_DBPASSWORD = 'rounduptest'
MYSQL_DBNAME = 'rounduptest'
MYSQL_DATABASE = (MYSQL_DBHOST, MYSQL_DBUSER, MYSQL_DBPASSWORD, MYSQL_DBNAME)
- ''')
- finally:
- f.close()
- init.initialise(self.dirname, 'sekrit')
-
- # check we can load the package
- instance = imp.load_package(self.dirname, self.dirname)
-
- # and open the database
- db = instance.open()
-
- # check the basics of the schema and initial data set
- l = db.priority.list()
- ae(l, ['1', '2', '3', '4', '5'])
- l = db.status.list()
- ae(l, ['1', '2', '3', '4', '5', '6', '7', '8'])
- l = db.keyword.list()
- ae(l, [])
- l = db.user.list()
- ae(l, ['1', '2'])
- l = db.msg.list()
- ae(l, [])
- l = db.file.list()
- ae(l, [])
- l = db.issue.list()
- ae(l, [])
-
+'''
if hasattr(backends, 'mysql'):
from roundup.backends import mysql as module
def tearDown(self):