repo_id stringclasses 409
values | prefix large_stringlengths 34 36.3k | target large_stringlengths 1 498 | assertion_type stringclasses 31
values | difficulty stringclasses 8
values | test_file stringlengths 10 121 | test_function stringlengths 1 104 | test_class stringlengths 0 51 | lineno int32 2 11.3k | commit_idx int32 |
|---|---|---|---|---|---|---|---|---|---|
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock, patch
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptContext
from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import (
R... | "200 OK") | self.assertEqual | string_literal | tests/test_response_handler.py | test_parse_http_status_line_valid | TestResponseHandler | 30 | null |
ipa-lab/hackingBuddyGPT | import unittest
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
class TestPromptGenerationHelper(unittest.TestCase):
def setUp(self):
self.host = "https://reqres.in"
self.description = "Fake API"
self.prompt_helper = PromptGenerationHelper(self.host, self.descript... | "eve.holt@reqres.in") | self.assertEqual | string_literal | tests/test_prompt_generation_helper.py | test_get_user_from_prompt | TestPromptGenerationHelper | 21 | null |
ipa-lab/hackingBuddyGPT | import unittest
from hackingBuddyGPT.utils.prompt_generation.information import PromptPurpose
from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_analyzer import ResponseAnalyzer
class TestResponseAnalyzer(unittest.TestCase):
def setUp(self):
self.auth_headers = (
"HTTP/... | 400) | self.assertEqual | numeric_literal | tests/test_response_analyzer.py | test_analyze_input_validation_invalid | TestResponseAnalyzer | 66 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.documentation import OpenAPISpecificationHandler
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptStrategy, PromptC... | result.startswith("user")) | self.assertTrue | func_call | tests/test_openAPI_specification_manager.py | test_replace_id_with_placeholder_current_step_2 | TestOpenAPISpecificationHandler | 162 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.documentation import OpenAPISpecificationHandler
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptStrategy, PromptC... | "OK") | self.assertEqual | string_literal | tests/test_openAPI_specification_manager.py | test_extract_status_code_and_message_valid | TestOpenAPISpecificationHandler | 123 | null |
ipa-lab/hackingBuddyGPT | import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.utils import LLMHandler
class TestLLMHandler(unittest.TestCase):
def setUp(self):
self.llm_mock = MagicMock()
self.capabilities = {"cap1": MagicMock(), "cap2": MagicMock()}
self.llm_handler = ... | 7) | self.assertEqual | numeric_literal | tests/test_llm_handler.py | test_add_created_object_limit | TestLLMHandler | 48 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing import OpenAPISpecificationParser
from hackingBuddyGPT.utils.prompt_generation.information import PenTestingInformation
from hackingBuddyGPT.usecases.web_api_testing.utils.configuration_han... | 0) | self.assertEqual | numeric_literal | tests/test_pentesting_information.py | test_generate_authentication_prompts | TestPenTestingInformation | 43 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.documentation import OpenAPISpecificationHandler
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptStrategy, PromptC... | "GET operation on /users") | self.assertEqual | string_literal | tests/test_openAPI_specification_manager.py | test_update_openapi_spec_success | TestOpenAPISpecificationHandler | 77 | null |
ipa-lab/hackingBuddyGPT | import unittest
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
class TestPromptGenerationHelper(unittest.TestCase):
def setUp(self):
self.host = "https://reqres.in"
self.description = "Fake API"
self.prompt_helper = PromptGenerationHelper(self.host, self.descript... | "pistol") | self.assertEqual | string_literal | tests/test_prompt_generation_helper.py | test_get_user_from_prompt | TestPromptGenerationHelper | 22 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.documentation import OpenAPISpecificationHandler
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptStrategy, PromptC... | message) | self.assertIsNone | variable | tests/test_openAPI_specification_manager.py | test_extract_status_code_and_message_invalid | TestOpenAPISpecificationHandler | 129 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.documentation import OpenAPISpecificationHandler
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptStrategy, PromptC... | result) | self.assertIn | variable | tests/test_openAPI_specification_manager.py | test_replace_id_with_placeholder_basic | TestOpenAPISpecificationHandler | 155 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.documentation import OpenAPISpecificationHandler
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptStrategy, PromptC... | self.openapi_handler.unsuccessful_paths) | self.assertIn | complex_expr | tests/test_openAPI_specification_manager.py | test_update_openapi_spec_unsuccessful | TestOpenAPISpecificationHandler | 116 | null |
ipa-lab/hackingBuddyGPT | import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.utils import LLMHandler
class TestLLMHandler(unittest.TestCase):
def setUp(self):
self.llm_mock = MagicMock()
self.capabilities = {"cap1": MagicMock(), "cap2": MagicMock()}
self.llm_handler = ... | created_objects) | self.assertIn | variable | tests/test_llm_handler.py | test_get_created_objects | TestLLMHandler | 57 | null |
ipa-lab/hackingBuddyGPT | from hackingBuddyGPT.utils.shell_root_detection import got_root
def test_got_root():
hostname = "i_dont_care"
assert got_root(hostname, "# ") is True
assert got_root(hostname, "$ ") is | False | assert | bool_literal | tests/test_root_detection.py | test_got_root | 8 | null | |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock, patch
from hackingBuddyGPT.utils.logging import LocalLogger
from hackingBuddyGPT.usecases.web_api_testing.simple_openapi_documentation import (
SimpleWebAPIDocumentation,
SimpleWebAPIDocumentationUseCase,
)
from hackingBuddyGPT.utils import Console... | self.agent.all_http_methods_found(1)) | self.assertFalse | func_call | tests/test_web_api_documentation.py | test_all_flags_found | TestSimpleWebAPIDocumentationTest | 47 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock, patch
from hackingBuddyGPT.usecases.web_api_testing.simple_web_api_testing import (
SimpleWebAPITestingUseCase, SimpleWebAPITesting,
)
from hackingBuddyGPT.utils import Console, DbStorage
from hackingBuddyGPT.utils.logging import LocalLogger
class Tes... | self.agent.all_test_cases_run()) | self.assertFalse | func_call | tests/test_web_api_testing.py | test_all_flags_found | TestSimpleWebAPITestingTest | 49 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import mock_open, patch
from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing.openapi_converter import (
OpenAPISpecificationConverter,
)
class TestOpenAPISpecificationConverter(unittest.TestCase):
def setUp(self):
self.converter = OpenAPISpec... | mock_open_file()) | assert_* | func_call | tests/test_openapi_converter.py | test_convert_file_yaml_to_json | TestOpenAPISpecificationConverter | 30 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock, patch
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptContext
from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import (
R... | result) | self.assertIsNone | variable | tests/test_response_handler.py | test_extract_response_example_invalid | TestResponseHandler | 52 | null |
ipa-lab/hackingBuddyGPT | import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_analyzer_with_llm import ResponseAnalyzerWithLLM
from hackingBuddyGPT.utils.prompt_generation.information import PromptPurpose
class TestResponseAnalyzerWithLLM(unittest.TestCase):
def se... | "application/json") | self.assertEqual | string_literal | tests/test_response_analyzer_with_llm.py | test_parse_http_response_success | TestResponseAnalyzerWithLLM | 32 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.documentation import OpenAPISpecificationHandler
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptStrategy, PromptC... | self.openapi_handler.is_partial_match("/users/1", ["/users/{id}"])) | self.assertTrue | func_call | tests/test_openAPI_specification_manager.py | test_is_partial_match_true | TestOpenAPISpecificationHandler | 165 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock
from openai.types.chat import ChatCompletionMessage
from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing import OpenAPISpecificationParser
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.... | len(prompt_history)) | self.assertEqual | func_call | tests/test_prompt_engineer_testing.py | test_generate_prompt_chain_of_thought | TestPromptEngineer | 87 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock, patch
from hackingBuddyGPT.usecases.web_api_testing.simple_web_api_testing import (
SimpleWebAPITestingUseCase, SimpleWebAPITesting,
)
from hackingBuddyGPT.utils import Console, DbStorage
from hackingBuddyGPT.utils.logging import LocalLogger
class Tes... | result) | self.assertFalse | variable | tests/test_web_api_testing.py | test_perform_round | TestSimpleWebAPITestingTest | 95 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock, patch
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptContext
from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import (
R... | updated_spec["components"]["schemas"]) | self.assertIn | complex_expr | tests/test_response_handler.py | test_parse_http_response_to_schema | TestResponseHandler | 104 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock, patch
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptContext
from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import (
R... | ValueError) | self.assertRaises | variable | tests/test_response_handler.py | test_parse_http_status_line_invalid | TestResponseHandler | 34 | null |
ipa-lab/hackingBuddyGPT | from typing import Tuple
from hackingBuddyGPT.utils.logging import LocalLogger
from hackingBuddyGPT.usecases.examples.agent import (
ExPrivEscLinux,
ExPrivEscLinuxUseCase,
)
from hackingBuddyGPT.usecases.examples.agent_with_state import (
ExPrivEscLinuxTemplated,
ExPrivEscLinuxTemplatedUseCase,
)
from ... | True | assert | bool_literal | tests/integration_minimal_test.py | test_linuxprivesc | 104 | null | |
ipa-lab/hackingBuddyGPT | import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_analyzer_with_llm import ResponseAnalyzerWithLLM
from hackingBuddyGPT.utils.prompt_generation.information import PromptPurpose
class TestResponseAnalyzerWithLLM(unittest.TestCase):
def se... | updated_history[0]["content"]) | self.assertIn | complex_expr | tests/test_response_analyzer_with_llm.py | test_process_step_calls_llm_handler | TestResponseAnalyzerWithLLM | 64 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import mock_open, patch
import yaml
from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing import (
OpenAPISpecificationParser,
)
class TestOpenAPISpecificationParser(unittest.TestCase):
def setUp(self):
self.filepath = os.path.join(os.path.di... | paths) | self.assertEqual | variable | tests/test_openapi_parser.py | test_get_paths | TestOpenAPISpecificationParser | 45 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing import OpenAPISpecificationParser
from hackingBuddyGPT.utils.prompt_generation.information import PenTestingInformation
from hackingBuddyGPT.usecases.web_api_testing.utils.configuration_han... | creation_paths) | self.assertIn | variable | tests/test_pentesting_information.py | test_assign_endpoint_categories | TestPenTestingInformation | 28 | null |
ipa-lab/hackingBuddyGPT | import unittest
from hackingBuddyGPT.utils.prompt_generation.information import PromptPurpose
from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_analyzer import ResponseAnalyzer
class TestResponseAnalyzer(unittest.TestCase):
def setUp(self):
self.auth_headers = (
"HTTP/... | document["Actual Behavior"]) | self.assertIn | complex_expr | tests/test_response_analyzer.py | test_document_findings | TestResponseAnalyzer | 87 | null |
ipa-lab/hackingBuddyGPT | import unittest
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
class TestPromptGenerationHelper(unittest.TestCase):
def setUp(self):
self.host = "https://reqres.in"
self.description = "Fake API"
self.prompt_helper = PromptGenerationHelper(self.host, self.descript... | " or 1=1--") | self.assertEqual | string_literal | tests/test_prompt_generation_helper.py | test_get_user_from_prompt_with_sql_injection | TestPromptGenerationHelper | 36 | null |
ipa-lab/hackingBuddyGPT | import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_analyzer_with_llm import ResponseAnalyzerWithLLM
from hackingBuddyGPT.utils.prompt_generation.information import PromptPurpose
class TestResponseAnalyzerWithLLM(unittest.TestCase):
def se... | "") | self.assertEqual | string_literal | tests/test_response_analyzer_with_llm.py | test_parse_http_response_html | TestResponseAnalyzerWithLLM | 47 | null |
ipa-lab/hackingBuddyGPT | from hackingBuddyGPT.utils.shell_root_detection import got_root
def test_got_root():
hostname = "i_dont_care"
assert got_root(hostname, "# ") is | True | assert | bool_literal | tests/test_root_detection.py | test_got_root | 7 | null | |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock, patch
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptContext
from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import (
R... | "yaml_content") | self.assertEqual | string_literal | tests/test_response_handler.py | test_read_yaml_to_string | TestResponseHandler | 113 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.documentation import OpenAPISpecificationHandler
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptStrategy, PromptC... | path) | self.assertEqual | variable | tests/test_openAPI_specification_manager.py | test_replace_crypto_with_id_not_found | TestOpenAPISpecificationHandler | 148 | null |
ipa-lab/hackingBuddyGPT | import unittest
from hackingBuddyGPT.utils.prompt_generation.information import PromptPurpose
from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_analyzer import ResponseAnalyzer
class TestResponseAnalyzer(unittest.TestCase):
def setUp(self):
self.auth_headers = (
"HTTP/... | "Invalid") | self.assertEqual | string_literal | tests/test_response_analyzer.py | test_analyze_input_validation_invalid | TestResponseAnalyzer | 67 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock, patch
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptContext
from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import (
R... | "Test description") | self.assertEqual | string_literal | tests/test_response_handler.py | test_extract_description | TestResponseHandler | 77 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing import OpenAPISpecificationParser
from hackingBuddyGPT.utils.prompt_generation.information import PenTestingInformation
from hackingBuddyGPT.usecases.web_api_testing.utils.configuration_han... | protected_endpoints) | self.assertIn | variable | tests/test_pentesting_information.py | test_assign_endpoint_categories | TestPenTestingInformation | 29 | null |
ipa-lab/hackingBuddyGPT | import unittest
from hackingBuddyGPT.utils.prompt_generation.information import PromptPurpose
from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_analyzer import ResponseAnalyzer
class TestResponseAnalyzer(unittest.TestCase):
def setUp(self):
self.auth_headers = (
"HTTP/... | result["auth_headers_present"]) | self.assertTrue | complex_expr | tests/test_response_analyzer.py | test_analyze_authentication | TestResponseAnalyzer | 59 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import mock_open, patch
import yaml
from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing import (
OpenAPISpecificationParser,
)
class TestOpenAPISpecificationParser(unittest.TestCase):
def setUp(self):
self.filepath = os.path.join(os.path.di... | servers) | self.assertEqual | variable | tests/test_openapi_parser.py | test_get_servers | TestOpenAPISpecificationParser | 20 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.documentation import OpenAPISpecificationHandler
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptStrategy, PromptC... | self.openapi_handler.endpoint_methods["/users"]) | self.assertIn | complex_expr | tests/test_openAPI_specification_manager.py | test_update_openapi_spec_success | TestOpenAPISpecificationHandler | 76 | null |
ipa-lab/hackingBuddyGPT | import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_analyzer_with_llm import ResponseAnalyzerWithLLM
from hackingBuddyGPT.utils.prompt_generation.information import PromptPurpose
class TestResponseAnalyzerWithLLM(unittest.TestCase):
def se... | {"id": 1, "name": "John"}) | self.assertEqual | collection | tests/test_response_analyzer_with_llm.py | test_parse_http_response_success | TestResponseAnalyzerWithLLM | 33 | null |
ipa-lab/hackingBuddyGPT | import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.utils import LLMHandler
class TestLLMHandler(unittest.TestCase):
def setUp(self):
self.llm_mock = MagicMock()
self.capabilities = {"cap1": MagicMock(), "cap2": MagicMock()}
self.llm_handler = ... | self.llm_handler.created_objects[object_type]) | self.assertIn | complex_expr | tests/test_llm_handler.py | test_add_created_object | TestLLMHandler | 39 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing import OpenAPISpecificationParser
from hackingBuddyGPT.utils.prompt_generation.information import PenTestingInformation
from hackingBuddyGPT.usecases.web_api_testing.utils.configuration_han... | "user") | self.assertEqual | string_literal | tests/test_pentesting_information.py | test_key_in_path | TestPenTestingInformation | 37 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock, patch
from hackingBuddyGPT.utils.logging import LocalLogger
from hackingBuddyGPT.usecases.web_api_testing.simple_openapi_documentation import (
SimpleWebAPIDocumentation,
SimpleWebAPIDocumentationUseCase,
)
from hackingBuddyGPT.utils import Console... | 1) | self.assertGreaterEqual | numeric_literal | tests/test_web_api_documentation.py | test_perform_round | TestSimpleWebAPIDocumentationTest | 95 | null |
ipa-lab/hackingBuddyGPT | import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.utils import LLMHandler
class TestLLMHandler(unittest.TestCase):
def setUp(self):
self.llm_mock = MagicMock()
self.capabilities = {"cap1": MagicMock(), "cap2": MagicMock()}
self.llm_handler = ... | created_objects[object_type]) | self.assertIn | complex_expr | tests/test_llm_handler.py | test_get_created_objects | TestLLMHandler | 58 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock, patch
from hackingBuddyGPT.usecases.web_api_testing.simple_web_api_testing import (
SimpleWebAPITestingUseCase, SimpleWebAPITesting,
)
from hackingBuddyGPT.utils import Console, DbStorage
from hackingBuddyGPT.utils.logging import LocalLogger
class Tes... | 1) | self.assertGreaterEqual | numeric_literal | tests/test_web_api_testing.py | test_perform_round | TestSimpleWebAPITestingTest | 101 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock, patch
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptContext
from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import (
R... | {"key": "value"}) | self.assertEqual | collection | tests/test_response_handler.py | test_extract_response_example | TestResponseHandler | 47 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.documentation import OpenAPISpecificationHandler
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptStrategy, PromptC... | "integer") | self.assertEqual | string_literal | tests/test_openAPI_specification_manager.py | test_get_type_integer | TestOpenAPISpecificationHandler | 132 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock
from hackingBuddyGPT.usecases.web_api_testing.documentation import OpenAPISpecificationHandler
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptStrategy, PromptC... | replaced) | self.assertIn | variable | tests/test_openAPI_specification_manager.py | test_replace_crypto_with_id_found | TestOpenAPISpecificationHandler | 143 | null |
ipa-lab/hackingBuddyGPT | import os
import unittest
from unittest.mock import MagicMock, patch
from hackingBuddyGPT.utils.prompt_generation import PromptGenerationHelper
from hackingBuddyGPT.utils.prompt_generation.information import PromptContext
from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import (
R... | "r") | assert_* | string_literal | tests/test_response_handler.py | test_read_yaml_to_string | TestResponseHandler | 112 | null |
MerrimanInd/drawpyo | import pytest
from drawpyo import load_diagram
from drawpyo.diagram import Object, Edge
SAMPLE_XML = """<mxfile host="Drawpyo">
<diagram name="Page-1">
<mxGraphModel dx="2037" dy="830" grid="1">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="100" value="List" style="swimlane" p... | 100 | assert | numeric_literal | tests/import_tests/test_import_drawio.py | test_geometry_parsing | TestDrawpyoParsing | 64 | null |
MerrimanInd/drawpyo | import pytest
from drawpyo.diagram_types.legend import Legend
from drawpyo.diagram.text_format import TextFormat
from drawpyo.utils.standard_colors import StandardColor
from drawpyo.utils.color_scheme import ColorScheme
from drawpyo.page import Page
from drawpyo.diagram.objects import Object, Group
def simple_mapping... | "" | assert | string_literal | tests/diagram_tests/legend_test.py | test_update_mapping_rebuilds | TestLegendUpdateMapping | 175 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
from drawpyo.diagram_types.binary_tree import BinaryNodeObject, BinaryTreeDiagram
class TestBinaryTreeDiagramFromDict:
def test_from_dict_nested_structure(self):
"""Test a more complex nested dictionary structure."""
data = {
"A": {"B": ["D", None], "C": ... | d | assert | variable | tests/diagram_tests/binary_tree_diagram_test.py | test_from_dict_nested_structure | TestBinaryTreeDiagramFromDict | 259 | null |
MerrimanInd/drawpyo | import pytest
from unittest.mock import Mock
from drawpyo.diagram_types.bar_chart import BarChart
from drawpyo.diagram.text_format import TextFormat
from drawpyo.diagram.objects import Object, Group
class TestBarChartUpdateData:
def test_update_data_basic(self):
"""Test basic data update."""
data ... | 3 | assert | numeric_literal | tests/diagram_tests/bar_chart_test.py | test_update_data_basic | TestBarChartUpdateData | 122 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
from drawpyo.diagram.base_diagram import (
color_input_check,
width_input_check,
style_str_from_dict,
import_shape_database,
)
class TestImportShapeDatabase:
def test_import_general_library(self) -> None:
"""Checks the import of the shared shape library"""
... | 0 | assert | numeric_literal | tests/diagram_tests/base_diagram_test.py | test_import_general_library | TestImportShapeDatabase | 191 | null |
MerrimanInd/drawpyo | import drawpyo
from pathlib import Path
import xml.etree.ElementTree as ET
import pytest
class TestFileAddPage:
def test_add_multiple_pages(self, empty_file: drawpyo.File) -> None:
"""Checks for adding multiple pages"""
page_1 = drawpyo.Page(file=empty_file, name="Page-1")
page_2 = drawpyo... | 3 | assert | numeric_literal | tests/file_test.py | test_add_multiple_pages | TestFileAddPage | 66 | null |
MerrimanInd/drawpyo | import pytest
from drawpyo import load_diagram
from drawpyo.diagram import Object, Edge
SAMPLE_XML = """<mxfile host="Drawpyo">
<diagram name="Page-1">
<mxGraphModel dx="2037" dy="830" grid="1">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="100" value="List" style="swimlane" p... | 150 | assert | numeric_literal | tests/import_tests/test_import_drawio.py | test_geometry_parsing | TestDrawpyoParsing | 63 | null |
MerrimanInd/drawpyo | import drawpyo
import pytest
class TestPageInit:
def test_grid_settings(self, empty_page: drawpyo.Page) -> None:
"""Checks the default grid settings"""
assert empty_page.grid == 1
assert empty_page.grid_size == | 10 | assert | numeric_literal | tests/page_test.py | test_grid_settings | TestPageInit | 28 | null |
MerrimanInd/drawpyo | import pytest
from unittest.mock import Mock
from drawpyo.diagram_types.bar_chart import BarChart
from drawpyo.diagram.text_format import TextFormat
from drawpyo.diagram.objects import Object, Group
class TestBarChartDimensions:
def test_calculate_chart_dimensions_single_bar(self):
"""Test dimensions with... | 50 | assert | numeric_literal | tests/diagram_tests/bar_chart_test.py | test_calculate_chart_dimensions_single_bar | TestBarChartDimensions | 278 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
from drawpyo.utils.color_scheme import ColorScheme
from drawpyo.utils.standard_colors import StandardColor
def parse_style(style: str) -> dict[str, str]:
"""Convert a style string into a dict for order-independent comparison."""
if not style:
return {}
parts = style.sp... | True | assert | bool_literal | tests/diagram_tests/object_test.py | test_rounded_corners | TestObjectSpecialProperties | 232 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
from drawpyo.diagram.edges import Edge, EdgeGeometry, EdgeLabel, Point
from drawpyo.utils.color_scheme import ColorScheme
class TestEdgeLineEnds:
def test_end_size(self, empty_page: drawpyo.Page) -> None:
"""Checks the size of the arrow at the end"""
edge = Edge(page=e... | 12 | assert | numeric_literal | tests/diagram_tests/edge_test.py | test_end_size | TestEdgeLineEnds | 122 | null |
MerrimanInd/drawpyo | import drawpyo
import pytest
class TestPageInit:
def test_page_dimensions(self, empty_page: drawpyo.Page) -> None:
"""Checks the default page dimensions"""
assert empty_page.scale == 1
assert empty_page.width == | 850 | assert | numeric_literal | tests/page_test.py | test_page_dimensions | TestPageInit | 41 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
class TestXMLBaseInit:
def test_default_values(self, xml_base: drawpyo.XMLBase) -> None:
"""Checks default values when creating XMLBase"""
assert xml_base.id == id(xml_base)
assert xml_base.xml_class == "xml_tag"
assert xml_base.xml_parent is | None | assert | none_literal | tests/xml_base_test.py | test_default_values | TestXMLBaseInit | 19 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
from drawpyo.diagram.edges import Edge, EdgeGeometry, EdgeLabel, Point
from drawpyo.utils.color_scheme import ColorScheme
class TestEdgeLineEnds:
def test_start_size(self, empty_page: drawpyo.Page) -> None:
"""Checks the size of the arrow at the start"""
edge = Edge(pa... | 10 | assert | numeric_literal | tests/diagram_tests/edge_test.py | test_start_size | TestEdgeLineEnds | 127 | null |
MerrimanInd/drawpyo | import pytest
from drawpyo.diagram_types.legend import Legend
from drawpyo.diagram.text_format import TextFormat
from drawpyo.utils.standard_colors import StandardColor
from drawpyo.utils.color_scheme import ColorScheme
from drawpyo.page import Page
from drawpyo.diagram.objects import Object, Group
def simple_mapping... | 2 | assert | numeric_literal | tests/diagram_tests/legend_test.py | test_update_mapping_rebuilds | TestLegendUpdateMapping | 174 | null |
MerrimanInd/drawpyo | import pytest
from unittest.mock import Mock
from drawpyo.diagram_types.bar_chart import BarChart
from drawpyo.diagram.text_format import TextFormat
from drawpyo.diagram.objects import Object, Group
class TestBarChartScaleCalculation:
def test_calculate_scale_basic(self):
"""Test basic scale calculation."... | 2.0 | assert | numeric_literal | tests/diagram_tests/bar_chart_test.py | test_calculate_scale_basic | TestBarChartScaleCalculation | 291 | null |
MerrimanInd/drawpyo | import drawpyo
import pytest
class TestPageInit:
def test_default_values(self, empty_page: drawpyo.Page) -> None:
"""Checks default values when creating a page"""
assert empty_page.id == id(empty_page)
assert len(empty_page.objects) == | 2 | assert | numeric_literal | tests/page_test.py | test_default_values | TestPageInit | 18 | null |
MerrimanInd/drawpyo | import pytest
from drawpyo.diagram_types.legend import Legend
from drawpyo.diagram.text_format import TextFormat
from drawpyo.utils.standard_colors import StandardColor
from drawpyo.utils.color_scheme import ColorScheme
from drawpyo.page import Page
from drawpyo.diagram.objects import Object, Group
def simple_mapping... | (0, 0) | assert | collection | tests/diagram_tests/legend_test.py | test_default_values | TestLegendInit | 72 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
from drawpyo.diagram.base_diagram import (
color_input_check,
width_input_check,
style_str_from_dict,
import_shape_database,
)
class TestGeometry:
def test_geometry_init_custom(self) -> None:
"""Checks whether a Geometry is initialized with user-defined values"... | 100 | assert | numeric_literal | tests/diagram_tests/base_diagram_test.py | test_geometry_init_custom | TestGeometry | 219 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
from drawpyo.utils.color_scheme import ColorScheme
from drawpyo.utils.standard_colors import StandardColor
def parse_style(style: str) -> dict[str, str]:
"""Convert a style string into a dict for order-independent comparison."""
if not style:
return {}
parts = style.sp... | "#000000" | assert | string_literal | tests/diagram_tests/object_test.py | test_template_chain | TestObjectTemplate | 141 | null |
MerrimanInd/drawpyo | import pytest
from drawpyo.diagram_types.legend import Legend
from drawpyo.diagram.text_format import TextFormat
from drawpyo.utils.standard_colors import StandardColor
from drawpyo.utils.color_scheme import ColorScheme
from drawpyo.page import Page
from drawpyo.diagram.objects import Object, Group
def simple_mapping... | True | assert | bool_literal | tests/diagram_tests/legend_test.py | test_title_object_created | TestLegendTitle | 103 | null |
MerrimanInd/drawpyo | import pytest
from drawpyo.diagram_types.legend import Legend
from drawpyo.diagram.text_format import TextFormat
from drawpyo.utils.standard_colors import StandardColor
from drawpyo.utils.color_scheme import ColorScheme
from drawpyo.page import Page
from drawpyo.diagram.objects import Object, Group
def simple_mapping... | StandardColor.GRAY1 | assert | complex_expr | tests/diagram_tests/legend_test.py | test_background_is_added | TestLegendBackground | 123 | null |
MerrimanInd/drawpyo | import pytest
from unittest.mock import Mock
from drawpyo.diagram_types.pie_chart import PieChart
from drawpyo.diagram.text_format import TextFormat
from drawpyo.diagram.objects import Object, Group
from drawpyo.utils.standard_colors import StandardColor
from drawpyo.utils.color_scheme import ColorScheme
class TestPie... | 3 | assert | numeric_literal | tests/diagram_tests/pie_chart_test.py | test_update_data_adjusts_colors | TestPieChartUpdateData | 167 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
from drawpyo.utils.color_scheme import ColorScheme
from drawpyo.utils.standard_colors import StandardColor
def parse_style(style: str) -> dict[str, str]:
"""Convert a style string into a dict for order-independent comparison."""
if not style:
return {}
parts = style.sp... | 100 | assert | numeric_literal | tests/diagram_tests/object_test.py | test_with_dimensions | TestObjectInit | 57 | null |
MerrimanInd/drawpyo | import pytest
from unittest.mock import Mock
from drawpyo.diagram_types.bar_chart import BarChart
from drawpyo.diagram.text_format import TextFormat
from drawpyo.diagram.objects import Object, Group
class TestBarChartAxisAndTicks:
def test_custom_tick_count(self):
"""Test custom tick count."""
cha... | 10 | assert | numeric_literal | tests/diagram_tests/bar_chart_test.py | test_custom_tick_count | TestBarChartAxisAndTicks | 234 | null |
MerrimanInd/drawpyo | import pytest
from unittest.mock import Mock
from drawpyo.diagram_types.bar_chart import BarChart
from drawpyo.diagram.text_format import TextFormat
from drawpyo.diagram.objects import Object, Group
class TestBarChartDataValidation:
def test_mixed_int_float_values(self):
"""Test mixed integer and float va... | data | assert | variable | tests/diagram_tests/bar_chart_test.py | test_mixed_int_float_values | TestBarChartDataValidation | 91 | null |
MerrimanInd/drawpyo | import pytest
from unittest.mock import Mock
from drawpyo.diagram_types.pie_chart import PieChart
from drawpyo.diagram.text_format import TextFormat
from drawpyo.diagram.objects import Object, Group
from drawpyo.utils.standard_colors import StandardColor
from drawpyo.utils.color_scheme import ColorScheme
class TestPie... | 1.0 | assert | numeric_literal | tests/diagram_tests/pie_chart_test.py | test_single_slice_full_circle | TestPieChartSliceCalculation | 267 | null |
MerrimanInd/drawpyo | import pytest
from drawpyo import ColorScheme, StandardColor
def test_hierarchy_defaults_used_when_both_missing():
obj = DummyObject()
assert obj.resolved_fill() == | DummyObject.DEFAULT_FILL | assert | complex_expr | tests/diagram_tests/color_management_test.py | test_hierarchy_defaults_used_when_both_missing | 205 | null | |
MerrimanInd/drawpyo | import pytest
import drawpyo
from drawpyo.utils.color_scheme import ColorScheme
from drawpyo.utils.standard_colors import StandardColor
def parse_style(style: str) -> dict[str, str]:
"""Convert a style string into a dict for order-independent comparison."""
if not style:
return {}
parts = style.sp... | "" | assert | string_literal | tests/diagram_tests/object_test.py | test_default_values | TestObjectInit | 36 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
class TestXMLBaseInit:
def test_custom_id(self) -> None:
"""Checks if an object with a user ID has been created"""
obj = drawpyo.XMLBase(id="custom_id")
assert obj.id == | "custom_id" | assert | string_literal | tests/xml_base_test.py | test_custom_id | TestXMLBaseInit | 26 | null |
MerrimanInd/drawpyo | from unittest.mock import patch, mock_open
import pytest
import os
from pathlib import Path
from drawpyo.drawio_import.mxlibrary_parser import parse_mxlibrary, load_mxlibrary
import drawpyo
FIXTURES_DIR = Path(__file__).parent / "fixtures"
SAMPLE_LIBRARY_PATH = FIXTURES_DIR / "sample_library.xml"
OUTPUT_DIR = Path(__... | 48 | assert | numeric_literal | tests/import_tests/test_mxlibrary_import.py | test_parse_mxlibrary_parsed_correctly | TestParseMxlibrary | 30 | null |
MerrimanInd/drawpyo | import pytest
from drawpyo import ColorScheme, StandardColor
def test_hierarchy_font_object_specific_override():
scheme = ColorScheme(font_color="#444444")
tf = DummyTextFormat(font_color="#555555")
obj = DummyObject(text_format=tf, color_scheme=scheme)
assert obj.resolved_font() == | "#555555" | assert | string_literal | tests/diagram_tests/color_management_test.py | test_hierarchy_font_object_specific_override | 215 | null | |
MerrimanInd/drawpyo | import pytest
import drawpyo
from drawpyo.utils.color_scheme import ColorScheme
from drawpyo.utils.standard_colors import StandardColor
def parse_style(style: str) -> dict[str, str]:
"""Convert a style string into a dict for order-independent comparison."""
if not style:
return {}
parts = style.sp... | 150 | assert | numeric_literal | tests/diagram_tests/object_test.py | test_with_dimensions | TestObjectInit | 56 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
from drawpyo.diagram.base_diagram import (
color_input_check,
width_input_check,
style_str_from_dict,
import_shape_database,
)
class TestStyleStrFromDict:
def test_complex_style_dict(self) -> None:
"""Checks a complex style dictionary"""
style_dict = {
... | 5 | assert | numeric_literal | tests/diagram_tests/base_diagram_test.py | test_complex_style_dict | TestStyleStrFromDict | 176 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
class TestXMLBaseInit:
def test_custom_xml_class(self, xml_base_with_class: drawpyo.XMLBase) -> None:
"""Checks if an object with a custom XML class is created"""
assert xml_base_with_class.xml_class == | "mxCell" | assert | string_literal | tests/xml_base_test.py | test_custom_xml_class | TestXMLBaseInit | 30 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
from drawpyo.diagram_types.binary_tree import BinaryNodeObject, BinaryTreeDiagram
class TestBinaryNodeReparenting:
def test_move_child_between_parents_using_properties(self):
"""Assigning a child to a new parent removes it from the old parent's children."""
p1 = Bina... | p2 | assert | variable | tests/diagram_tests/binary_tree_diagram_test.py | test_move_child_between_parents_using_properties | TestBinaryNodeReparenting | 60 | null |
MerrimanInd/drawpyo | import pytest
from drawpyo import ColorScheme, StandardColor
def test_invalid_hex_raises_value_error():
with pytest.raises( | ValueError) | pytest.raises | variable | tests/diagram_tests/color_management_test.py | test_invalid_hex_raises_value_error | 105 | null | |
MerrimanInd/drawpyo | import pytest
from unittest.mock import Mock
from drawpyo.diagram_types.pie_chart import PieChart
from drawpyo.diagram.text_format import TextFormat
from drawpyo.diagram.objects import Object, Group
from drawpyo.utils.standard_colors import StandardColor
from drawpyo.utils.color_scheme import ColorScheme
class TestPie... | 200 | assert | numeric_literal | tests/diagram_tests/pie_chart_test.py | test_default_size_constant | TestPieChartConstants | 517 | null |
MerrimanInd/drawpyo | import drawpyo
import pytest
class TestPageObjects:
def test_add_object(self, empty_page: drawpyo.Page) -> None:
"""Checks if an object has been added to the page"""
obj = drawpyo.diagram.Object(page=empty_page, value="Test")
assert len(empty_page.objects) == | 3 | assert | numeric_literal | tests/page_test.py | test_add_object | TestPageObjects | 140 | null |
MerrimanInd/drawpyo | import pytest
from drawpyo import load_diagram
from drawpyo.diagram import Object, Edge
SAMPLE_XML = """<mxfile host="Drawpyo">
<diagram name="Page-1">
<mxGraphModel dx="2037" dy="830" grid="1">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="100" value="List" style="swimlane" p... | 3 | assert | numeric_literal | tests/import_tests/test_import_drawio.py | test_diagram_loads | TestDrawpyoParsing | 38 | null |
MerrimanInd/drawpyo | from unittest.mock import patch, mock_open
import pytest
import os
from pathlib import Path
from drawpyo.drawio_import.mxlibrary_parser import parse_mxlibrary, load_mxlibrary
import drawpyo
FIXTURES_DIR = Path(__file__).parent / "fixtures"
SAMPLE_LIBRARY_PATH = FIXTURES_DIR / "sample_library.xml"
OUTPUT_DIR = Path(__... | 1 | assert | numeric_literal | tests/import_tests/test_mxlibrary_import.py | test_parse_mxlibrary_missing_xml_field | TestParseMxlibrary | 52 | null |
MerrimanInd/drawpyo | import pytest
from drawpyo.diagram_types.legend import Legend
from drawpyo.diagram.text_format import TextFormat
from drawpyo.utils.standard_colors import StandardColor
from drawpyo.utils.color_scheme import ColorScheme
from drawpyo.page import Page
from drawpyo.diagram.objects import Object, Group
def simple_mapping... | 5 | assert | numeric_literal | tests/diagram_tests/legend_test.py | test_title_object_created | TestLegendTitle | 98 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
from drawpyo.diagram.base_diagram import (
color_input_check,
width_input_check,
style_str_from_dict,
import_shape_database,
)
class TestStyleStrFromDict:
def test_empty_dict(self) -> None:
"""Checks for an empty dictionary"""
result = style_str_from_di... | "" | assert | string_literal | tests/diagram_tests/base_diagram_test.py | test_empty_dict | TestStyleStrFromDict | 150 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
class TestXmlIfy:
@pytest.mark.parametrize(
"input_str,expected",
[
(">", ">"),
("<", "<"),
("&", "&"),
('"', """),
("'", "'"),
("", ""),
("hello", "hello"),
... | expected | assert | variable | tests/xml_base_test.py | test_xml_ify | TestXmlIfy | 109 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
class TestXMLBaseTags:
def test_basic_close_tag(self, xml_base_with_class: drawpyo.XMLBase) -> None:
"""Checks the generation of the closing tag"""
assert xml_base_with_class.xml_close_tag == | "</mxCell>" | assert | string_literal | tests/xml_base_test.py | test_basic_close_tag | TestXMLBaseTags | 74 | null |
MerrimanInd/drawpyo | import pytest
from unittest.mock import Mock
from drawpyo.diagram_types.bar_chart import BarChart
from drawpyo.diagram.text_format import TextFormat
from drawpyo.diagram.objects import Object, Group
class TestBarChartTextFormatting:
def test_custom_text_formats(self):
"""Test custom text formats are appli... | 24 | assert | numeric_literal | tests/diagram_tests/bar_chart_test.py | test_custom_text_formats | TestBarChartTextFormatting | 327 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
from drawpyo.utils.color_scheme import ColorScheme
from drawpyo.utils.standard_colors import StandardColor
def parse_style(style: str) -> dict[str, str]:
"""Convert a style string into a dict for order-independent comparison."""
if not style:
return {}
parts = style.sp... | 50 | assert | numeric_literal | tests/diagram_tests/object_test.py | test_opacity | TestObjectSpecialProperties | 227 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
from drawpyo.diagram.edges import Edge, EdgeGeometry, EdgeLabel, Point
from drawpyo.utils.color_scheme import ColorScheme
class TestEdgeGeometry:
def test_entry_exit_offsets(self, empty_page: drawpyo.Page) -> None:
"""Checks the offsets of entry and exit points"""
edge... | 15 | assert | numeric_literal | tests/diagram_tests/edge_test.py | test_entry_exit_offsets | TestEdgeGeometry | 158 | null |
MerrimanInd/drawpyo | import pytest
from drawpyo import load_diagram
from drawpyo.diagram import Object, Edge
SAMPLE_XML = """<mxfile host="Drawpyo">
<diagram name="Page-1">
<mxGraphModel dx="2037" dy="830" grid="1">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="100" value="List" style="swimlane" p... | 30 | assert | numeric_literal | tests/import_tests/test_import_drawio.py | test_geometry_parsing | TestDrawpyoParsing | 69 | null |
MerrimanInd/drawpyo | import pytest
import drawpyo
from drawpyo.diagram_types.binary_tree import BinaryNodeObject, BinaryTreeDiagram
class TestBinaryTreeDiagramFromDict:
def test_from_dict_basic_structure(self):
"""Test a simple dictionary structure."""
data = {"Root": ["LeftChild", "RightChild"]}
diagram = B... | 3 | assert | numeric_literal | tests/diagram_tests/binary_tree_diagram_test.py | test_from_dict_basic_structure | TestBinaryTreeDiagramFromDict | 232 | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.