From c3fdab8ec52bd1328680029bcd87299cf85388a0 Mon Sep 17 00:00:00 2001 From: Pratham Chauhan Date: Wed, 29 Mar 2023 22:57:11 +0530 Subject: [PATCH] Add new test test_rdoc_to_capa --- tests/test_result_document.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_result_document.py b/tests/test_result_document.py index 01643091..ccd79d72 100644 --- a/tests/test_result_document.py +++ b/tests/test_result_document.py @@ -232,4 +232,9 @@ def test_basic_block_node_from_capa(): def test_json_to_rdoc(): path = fixtures.get_data_path_by_name("pma01-01-rd") - assert isinstance(rdoc.ResultDocument.parse_file(path),rdoc.ResultDocument) \ No newline at end of file + assert isinstance(rdoc.ResultDocument.parse_file(path),rdoc.ResultDocument) + +def test_rdoc_to_capa(): + path = fixtures.get_data_path_by_name("pma01-01-rd") + assert len(rdoc.ResultDocument.parse_file(path).to_capa()) ==2 + assert isinstance(rdoc.ResultDocument.parse_file(path).to_capa(),tuple) \ No newline at end of file