mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Remove unnessecary functions from unittest, fix one bug (return tuples) in cursor.
This commit is contained in:
@@ -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()'):
|
||||
|
||||
@@ -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']:
|
||||
|
||||
Reference in New Issue
Block a user