Remove unnessecary functions from unittest, fix one bug (return tuples) in cursor.

This commit is contained in:
Feike Steenbergen
2015-05-21 14:53:25 +02:00
parent 836a681157
commit 7f458a84bb
2 changed files with 1 additions and 18 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ class MockCursor:
if sql.startswith('blabla'):
raise psycopg2.OperationalError()
elif sql.startswith('SELECT slot_name'):
self.results = ['blabla', 'foobar']
self.results = [('blabla',), ('foobar',)]
elif sql.startswith('SELECT pg_current_xlog_location()'):
self.results = [(0, )]
elif sql.startswith('SELECT %s - (pg_last_xlog_replay_location()'):
-17
View File
@@ -15,23 +15,6 @@ else:
class TestStatusPage(unittest.TestCase):
def __init__(self, method_name='runTest'):
self.setUp = self.set_up
self.tearDown = self.tear_down
super(TestStatusPage, self).__init__(method_name)
def set_up(self):
pass
def tear_down(self):
pass
def test_statuspage_main(self):
pass
def test_statuspage_initialize(self):
pass
def test_do_GET(self):
for mock_recovery in [True, False]:
for page in [b'GET /pg_master', b'GET /pg_slave', b'GET /pg_status', b'GET /not_found']: