upgraded to pymysql 0.2
This commit is contained in:
@@ -1,20 +1,18 @@
|
||||
from gluon.contrib import pymysql
|
||||
import pymysql
|
||||
import unittest
|
||||
|
||||
class PyMySQLTestCase(unittest.TestCase):
|
||||
# Edit this to suit your test environment.
|
||||
databases = [
|
||||
{"host":"localhost","user":"root",
|
||||
"passwd":"","db":"test_pymysql", "use_unicode": True},
|
||||
{"host":"localhost","user":"root","passwd":"","db":"test_pymysql2"}]
|
||||
|
||||
def setUp(self):
|
||||
try:
|
||||
self.connections = []
|
||||
self.connections = []
|
||||
|
||||
for params in self.databases:
|
||||
self.connections.append(pymysql.connect(**params))
|
||||
except pymysql.err.OperationalError as e:
|
||||
self.skipTest('Cannot connect to MySQL - skipping pymysql tests because of (%s) %s' % (type(e), e))
|
||||
for params in self.databases:
|
||||
self.connections.append(pymysql.connect(**params))
|
||||
|
||||
def tearDown(self):
|
||||
for connection in self.connections:
|
||||
|
||||
Reference in New Issue
Block a user