'SIGINT is ignored in Python and passed to psql to abort quries.'

def test_sigint_handler(self):

    def _mock_subprocess_call(*args):
        handler = signal.getsignal(signal.SIGINT)
        self.assertEqual(handler, signal.SIG_IGN)
    sigint_handler = signal.getsignal(signal.SIGINT)
    self.assertNotEqual(sigint_handler, signal.SIG_IGN)
    with mock.patch('subprocess.check_call', new=_mock_subprocess_call):
        DatabaseClient.runshell_db({})
    self.assertEqual(sigint_handler, signal.getsignal(signal.SIGINT))
