Fix unit tests
This commit is contained in:
parent
2f8d5312eb
commit
fde9af0595
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue