From e2e0a846ca8b1da519f896a56c7e4a4418f880d9 Mon Sep 17 00:00:00 2001 From: Chuong Ho <31106432+chuongmep@users.noreply.github.com> Date: Tue, 19 Mar 2024 21:36:07 +0800 Subject: [PATCH] fix unitest --- APSToolkitPython/src/test/test_bim360.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/APSToolkitPython/src/test/test_bim360.py b/APSToolkitPython/src/test/test_bim360.py index 3f283a3..bc41f6c 100644 --- a/APSToolkitPython/src/test/test_bim360.py +++ b/APSToolkitPython/src/test/test_bim360.py @@ -36,19 +36,21 @@ def test_get_folder_contents(self): top_folders = self.bim360.get_top_folders(hubs['data'][0]['id'], projects['data'][0]['id']) folder_contents = self.bim360.get_folder_contents(projects['data'][0]['id'], top_folders['data'][0]['id']) self.assertNotEquals(folder_contents, 0) + def test_get_item_info(self): item_info = self.bim360.get_item_info(self.project_id, self.item_id) self.assertNotEquals(item_info, 0) - def test_get_item_versions(self): - items =self.bim360.batch_report_items(self.project_id, self.folder_id) - self.assertNotEquals(items, 0) + def test_get_item_versions(self): + items = self.bim360.batch_report_items(self.project_id, self.folder_id) + self.assertNotEquals(len(items), 0) def test_batch_report_item_versions(self): df = self.bim360.batch_report_item_versions(self.project_id, self.item_id) self.assertNotEquals(df.empty, True) + def test_get_urn_item_version(self): - urn = self.bim360.get_urn_item_version(self.project_id, self.item_id,2) + urn = self.bim360.get_urn_item_version(self.project_id, self.item_id, 2) self.assertNotEquals(urn, "") def test_batch_report_projects(self): @@ -57,4 +59,4 @@ def test_batch_report_projects(self): def test_get_item__display_name(self): item_name = self.bim360.get_item_display_name(self.project_id, self.item_id) - self.assertNotEquals(item_name, "") \ No newline at end of file + self.assertNotEquals(item_name, "")