summaryrefslogtreecommitdiff
path: root/tests/test_dates.py
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2010-12-21 04:58:38 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2010-12-21 05:02:19 +0000
commitade1b2cc7b9fc7b0fc05f70e2c15c1d1d1e56ca8 (patch)
treea831e5f16a239ca33c7920bbada5f58928a954e5 /tests/test_dates.py
parentf697410ab4aac2f7ac789e78efc4e5ac5dfb6f71 (diff)
downloadpsycopg2-ade1b2cc7b9fc7b0fc05f70e2c15c1d1d1e56ca8.tar.gz
Test suite converted into a proper package.
Dropped cyclic import from modules to tests: they were only working because a second copy of the package was found in the project dir. Use relative import so that 2to3 can do a good conversion.
Diffstat (limited to 'tests/test_dates.py')
-rw-r--r--tests/test_dates.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_dates.py b/tests/test_dates.py
index 9958913..44b1bc5 100644
--- a/tests/test_dates.py
+++ b/tests/test_dates.py
@@ -2,9 +2,9 @@
import math
import unittest
-import tests
import psycopg2
from psycopg2.tz import FixedOffsetTimezone
+from testconfig import dsn
class CommonDatetimeTestsMixin:
@@ -75,7 +75,7 @@ class DatetimeTests(unittest.TestCase, CommonDatetimeTestsMixin):
"""Tests for the datetime based date handling in psycopg2."""
def setUp(self):
- self.conn = psycopg2.connect(tests.dsn)
+ self.conn = psycopg2.connect(dsn)
self.curs = self.conn.cursor()
self.DATE = psycopg2._psycopg.PYDATE
self.TIME = psycopg2._psycopg.PYTIME
@@ -293,7 +293,7 @@ class mxDateTimeTests(unittest.TestCase, CommonDatetimeTestsMixin):
"""Tests for the mx.DateTime based date handling in psycopg2."""
def setUp(self):
- self.conn = psycopg2.connect(tests.dsn)
+ self.conn = psycopg2.connect(dsn)
self.curs = self.conn.cursor()
self.DATE = psycopg2._psycopg.MXDATE
self.TIME = psycopg2._psycopg.MXTIME