summaryrefslogtreecommitdiff
path: root/tests/test_copy.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_copy.py')
-rwxr-xr-xtests/test_copy.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/test_copy.py b/tests/test_copy.py
index bc1cab3..fd6c14a 100755
--- a/tests/test_copy.py
+++ b/tests/test_copy.py
@@ -24,13 +24,13 @@
import sys
import string
-from testutils import unittest, decorate_all_tests, skip_if_no_iobase
+from testutils import unittest, ConnectingTestCase, decorate_all_tests
+from testutils import skip_if_no_iobase
from cStringIO import StringIO
from itertools import cycle, izip
import psycopg2
import psycopg2.extensions
-from testconfig import dsn
from testutils import skip_copy_if_green
if sys.version_info[0] < 3:
@@ -58,10 +58,10 @@ class MinimalWrite(_base):
return self.f.write(data)
-class CopyTests(unittest.TestCase):
+class CopyTests(ConnectingTestCase):
def setUp(self):
- self.conn = psycopg2.connect(dsn)
+ ConnectingTestCase.setUp(self)
self._create_temp_table()
def _create_temp_table(self):
@@ -72,9 +72,6 @@ class CopyTests(unittest.TestCase):
data text
)''')
- def tearDown(self):
- self.conn.close()
-
def test_copy_from(self):
curs = self.conn.cursor()
try: