From fde9af059571a303d2c4922bc350714a4d4527f5 Mon Sep 17 00:00:00 2001 From: Daniel Egger Date: Tue, 4 Jun 2024 15:08:29 +0200 Subject: [PATCH] Fix unit tests --- server/integration_tests/abacus_sftp/test_abacus_sftp.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/integration_tests/abacus_sftp/test_abacus_sftp.py b/server/integration_tests/abacus_sftp/test_abacus_sftp.py index d1b844b7..06d76aa6 100644 --- a/server/integration_tests/abacus_sftp/test_abacus_sftp.py +++ b/server/integration_tests/abacus_sftp/test_abacus_sftp.py @@ -44,7 +44,7 @@ class AbacusSftpServerTestCase(BaseAbacusSftpServerTestCase): def test_canWriteFile_toFakeSftpServer(self): with AbacusSftpClient() as client: files = client.listdir(".") - self.assertEqual(["debitor", "order"], files) + self.assertSetEqual({"debitor", "order"}, set(files)) str_file = StringIO() str_file.write("Hello world\n") @@ -52,7 +52,7 @@ class AbacusSftpServerTestCase(BaseAbacusSftpServerTestCase): client.putfo(str_file, "hello.txt") files = client.listdir(".") - self.assertEqual({"debitor", "order", "hello.txt"}, set(files)) + self.assertSetEqual({"debitor", "order", "hello.txt"}, set(files)) class AbacusInvoiceUploadTestCase(BaseAbacusSftpServerTestCase): @@ -117,14 +117,14 @@ class AbacusInvoiceUploadTestCase(BaseAbacusSftpServerTestCase): feuz_checkout_info.refresh_from_db() self.assertTrue(feuz_checkout_info.abacus_ssh_upload_done) - # calling `abacus_ssh_upload` a second time will not upload order file again... + # calling `abacus_ssh_upload` a second time will not upload files again... os.remove(debitor_filepath) os.remove(order_filepath) abacus_ssh_upload(feuz_checkout_info) debitor_filepath = self.tmppath + "/debitor/myVBV_debi_60000012.xml" - self.assertTrue(os.path.exists(debitor_filepath)) + self.assertFalse(os.path.exists(debitor_filepath)) order_filepath = ( self.tmppath + "/order/myVBV_orde_60000012_20240215083312_6000000124.xml"