bpo-40956: Fix segfault when Connection.backup is called without target (GH-24503)

This commit is contained in:
Erlend Egeberg Aasland 2021-02-11 00:04:02 +01:00 committed by GitHub
parent 749d40a53f
commit ea46579067
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 22 deletions

View file

@ -17,9 +17,11 @@ class BackupTests(unittest.TestCase):
self.assertEqual(result[0][0], 3)
self.assertEqual(result[1][0], 4)
def test_bad_target_none(self):
def test_bad_target(self):
with self.assertRaises(TypeError):
self.cx.backup(None)
with self.assertRaises(TypeError):
self.cx.backup()
def test_bad_target_filename(self):
with self.assertRaises(TypeError):