Fix test suite for Postgres backup helper

This commit is contained in:
Olivier 'reivilibre' 2021-11-14 15:47:43 +00:00
parent 2b047b7adb
commit 640d0e79f8
1 changed files with 3 additions and 1 deletions

View File

@ -50,6 +50,7 @@ class TestPostgresHelper(TestCase):
stdout = proc.stdout.read()
self.assertEqual(proc.wait(), 0)
self.assertIn(b"CREATE TABLE", stdout)
proc.stdout.close()
def test_backup_and_extraction(self):
td = TemporaryDirectory("test_pg_bae")
@ -63,7 +64,7 @@ class TestPostgresHelper(TestCase):
set_up_simple_datman(
datman_path,
custom_extra_test=f"""
[source.postgres123]
[sources.postgres123]
helper = "postgres"
label = "precious"
kind = {{ stdout = "postgres123.sql" }}
@ -104,3 +105,4 @@ user = "{pg_user}"
self.assertIsInstance(value, DirectoryDescriptor)
key, value = next(iter(value.contents.items()))
self.assertEqual(key, "postgres123.sql")
td.cleanup()