repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_analyzer.py
test_analyze_authentication_authorization
self.assertTrue
complex_expr
33
import unittest from unittest.mock import patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_analyzer import ResponseAnalyzer from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.information.prompt_information import PromptPurpose class TestResponseAnalyzer(unittest.TestCase):...
analysis['content_body'])
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_analyzer.py
test_analyze_authentication_authorization
self.assertIn
complex_expr
34
import unittest from unittest.mock import patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_analyzer import ResponseAnalyzer from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.information.prompt_information import PromptPurpose class TestResponseAnalyzer(unittest.TestCase):...
analysis['rate_limiting'])
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_analyzer.py
test_analyze_input_validation
self.assertTrue
complex_expr
33
import unittest from unittest.mock import patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_analyzer import ResponseAnalyzer from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.information.prompt_information import PromptPurpose class TestResponseAnalyzer(unittest.TestCase):...
analysis['response_body'])
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_analyzer.py
test_parse_http_response
self.assertEqual
string_literal
32
import unittest from unittest.mock import patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_analyzer import ResponseAnalyzer from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.information.prompt_information import PromptPurpose class TestResponseAnalyzer(unittest.TestCase):...
'application/json; charset=utf-8')
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_handler.py
test_read_yaml_to_string
assert_*
string_literal
16
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import ResponseHandler class TestResponseHandler(unittest.TestCase): def setUp(self): self.llm_handler_mock = MagicMock() self.response_handler = ResponseHa...
'r')
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_handler.py
test_extract_response_example_invalid
self.assertIsNone
variable
15
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import ResponseHandler class TestResponseHandler(unittest.TestCase): def setUp(self): self.llm_handler_mock = MagicMock() self.response_handler = ResponseHa...
result)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_handler.py
test_parse_http_response_to_openapi_example
self.assertEqual
string_literal
25
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import ResponseHandler class TestResponseHandler(unittest.TestCase): def setUp(self): self.llm_handler_mock = MagicMock() self.response_handler = ResponseHa...
"Test")
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_handler.py
test_parse_http_status_line_valid
self.assertEqual
string_literal
15
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import ResponseHandler class TestResponseHandler(unittest.TestCase): def setUp(self): self.llm_handler_mock = MagicMock() self.response_handler = ResponseHa...
"200 OK")
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_handler.py
test_parse_http_response_to_openapi_example
self.assertIn
variable
27
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import ResponseHandler class TestResponseHandler(unittest.TestCase): def setUp(self): self.llm_handler_mock = MagicMock() self.response_handler = ResponseHa...
entry_dict)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_handler.py
test_parse_http_status_line_invalid
self.assertRaises
variable
14
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import ResponseHandler class TestResponseHandler(unittest.TestCase): def setUp(self): self.llm_handler_mock = MagicMock() self.response_handler = ResponseHa...
ValueError)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_handler.py
test_parse_http_response_to_openapi_example
self.assertEqual
variable
26
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import ResponseHandler class TestResponseHandler(unittest.TestCase): def setUp(self): self.llm_handler_mock = MagicMock() self.response_handler = ResponseHa...
openapi_spec)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_handler.py
test_read_yaml_to_string
self.assertEqual
string_literal
17
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import ResponseHandler class TestResponseHandler(unittest.TestCase): def setUp(self): self.llm_handler_mock = MagicMock() self.response_handler = ResponseHa...
'yaml_content')
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_handler.py
test_get_response_for_prompt
self.assertEqual
string_literal
21
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import ResponseHandler class TestResponseHandler(unittest.TestCase): def setUp(self): self.llm_handler_mock = MagicMock() self.response_handler = ResponseHa...
"Response text")
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_handler.py
test_extract_response_example
self.assertEqual
collection
22
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import ResponseHandler class TestResponseHandler(unittest.TestCase): def setUp(self): self.llm_handler_mock = MagicMock() self.response_handler = ResponseHa...
{"key": "value"})
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_handler.py
test_extract_description
self.assertEqual
string_literal
16
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import ResponseHandler class TestResponseHandler(unittest.TestCase): def setUp(self): self.llm_handler_mock = MagicMock() self.response_handler = ResponseHa...
"Test description")
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_handler.py
test_parse_http_response_to_schema
self.assertEqual
string_literal
36
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import ResponseHandler class TestResponseHandler(unittest.TestCase): def setUp(self): self.llm_handler_mock = MagicMock() self.response_handler = ResponseHa...
"#/components/schemas/Test")
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_handler.py
test_extract_keys
self.assertEqual
collection
18
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import ResponseHandler class TestResponseHandler(unittest.TestCase): def setUp(self): self.llm_handler_mock = MagicMock() self.response_handler = ResponseHa...
{"type": "str", "example": "test"})
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_handler.py
test_parse_http_response_to_schema
self.assertIn
complex_expr
38
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import ResponseHandler class TestResponseHandler(unittest.TestCase): def setUp(self): self.llm_handler_mock = MagicMock() self.response_handler = ResponseHa...
updated_spec["components"]["schemas"])
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_handler.py
test_parse_http_response_to_schema
self.assertIn
complex_expr
39
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.response_processing.response_handler import ResponseHandler class TestResponseHandler(unittest.TestCase): def setUp(self): self.llm_handler_mock = MagicMock() self.response_handler = ResponseHa...
updated_spec["components"]["schemas"]["Test"]["properties"])
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_root_detection.py
test_got_root
assert
bool_literal
7
from hackingBuddyGPT.utils.shell_root_detection import got_root def test_got_root(): hostname = "i_dont_care" assert got_root(hostname, "# ") is
True
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_root_detection.py
test_got_root
assert
bool_literal
8
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
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_web_api_documentation.py
test_perform_round
self.assertGreaterEqual
numeric_literal
57
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.simple_openapi_documentation import SimpleWebAPIDocumentationUseCase, \ SimpleWebAPIDocumentation from hackingBuddyGPT.utils import DbStorage, Console class TestSimpleWebAPIDocumentationTest(unittest.TestCase):...
1)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_web_api_documentation.py
test_perform_round
self.assertFalse
variable
51
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.simple_openapi_documentation import SimpleWebAPIDocumentationUseCase, \ SimpleWebAPIDocumentation from hackingBuddyGPT.utils import DbStorage, Console class TestSimpleWebAPIDocumentationTest(unittest.TestCase):...
result)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_web_api_documentation.py
test_all_flags_found
self.assertFalse
func_call
32
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.simple_openapi_documentation import SimpleWebAPIDocumentationUseCase, \ SimpleWebAPIDocumentation from hackingBuddyGPT.utils import DbStorage, Console class TestSimpleWebAPIDocumentationTest(unittest.TestCase):...
self.agent.all_http_methods_found(1))
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_web_api_documentation.py
test_initial_prompt
self.assertIn
complex_expr
32
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases.web_api_testing.simple_openapi_documentation import SimpleWebAPIDocumentationUseCase, \ SimpleWebAPIDocumentation from hackingBuddyGPT.utils import DbStorage, Console class TestSimpleWebAPIDocumentationTest(unittest.TestCase):...
self.agent._prompt_history[0]['content'])
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_web_api_testing.py
test_perform_round
self.assertGreaterEqual
numeric_literal
58
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases import SimpleWebAPITesting from hackingBuddyGPT.usecases.web_api_testing.simple_web_api_testing import SimpleWebAPITestingUseCase from hackingBuddyGPT.utils import DbStorage, Console class TestSimpleWebAPITestingTest(unittest.Test...
1)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_web_api_testing.py
test_perform_round
self.assertFalse
variable
51
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases import SimpleWebAPITesting from hackingBuddyGPT.usecases.web_api_testing.simple_web_api_testing import SimpleWebAPITestingUseCase from hackingBuddyGPT.utils import DbStorage, Console class TestSimpleWebAPITestingTest(unittest.Test...
result)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_web_api_testing.py
test_all_flags_found
self.assertFalse
func_call
32
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases import SimpleWebAPITesting from hackingBuddyGPT.usecases.web_api_testing.simple_web_api_testing import SimpleWebAPITestingUseCase from hackingBuddyGPT.utils import DbStorage, Console class TestSimpleWebAPITestingTest(unittest.Test...
self.agent.all_http_methods_found())
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_web_api_testing.py
test_initial_prompt
self.assertIn
complex_expr
30
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.usecases import SimpleWebAPITesting from hackingBuddyGPT.usecases.web_api_testing.simple_web_api_testing import SimpleWebAPITestingUseCase from hackingBuddyGPT.utils import DbStorage, Console class TestSimpleWebAPITestingTest(unittest.Test...
self.agent._prompt_history[0]['content'])
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/actions/test_commit_and_push.py
check_commit
assert
string_literal
10
import pytest from git.repo import Repo from autopr.models.executable import ExecutableId from autopr.tests.utils import create_ephemeral_main_service, run_action_manually_with_main def check_commit(commit): # assert commit message assert commit.message ==
"My commit message\n"
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/actions/test_commit_and_push.py
check_commit
assert
collection
12
import pytest from git.repo import Repo from autopr.models.executable import ExecutableId from autopr.tests.utils import create_ephemeral_main_service, run_action_manually_with_main def check_commit(commit): # assert commit message assert commit.message == "My commit message\n" # assert fi...
{ "insertions": 1, "deletions": 0, "lines": 1, }
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/actions/test_crawl_folder.py
test_actions
assert
variable
46
import os from typing import Any, Optional import pydantic import pytest from autopr.actions.utils.prompt_context import PromptContext, PromptContextEntry from autopr.models.executable import ContextDict, ExecutableId from autopr.tests.mock_openai import mock_openai from autopr.tests.utils import run_action_manuall...
outputs
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/actions/test_crawl_folder.py
test_actions
assert
func_call
47
import os from typing import Any, Optional import pydantic import pytest from autopr.actions.utils.prompt_context import PromptContext, PromptContextEntry from autopr.models.executable import ContextDict, ExecutableId from autopr.tests.mock_openai import mock_openai from autopr.tests.utils import run_action_manuall...
sorted(expected_ls)
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/actions/test_find_todos.py
test_language_not_found
pytest.raises
variable
24
import os from typing import Any, Optional from unittest.mock import patch import pydantic import pytest from autopr.actions.utils.prompt_context import PromptContext, PromptContextEntry from autopr.models.executable import ContextDict, ExecutableId from autopr.services.platform_service import DummyPlatformService f...
ValueError)
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/actions/test_find_todos.py
test_actions
assert
variable
194
import os from typing import Any, Optional from unittest.mock import patch import pydantic import pytest from autopr.actions.utils.prompt_context import PromptContext, PromptContextEntry from autopr.models.executable import ContextDict, ExecutableId from autopr.services.platform_service import DummyPlatformService f...
expected_outputs
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/actions/test_prompt.py
test_caching
assert
numeric_literal
34
import os from unittest.mock import AsyncMock, patch, MagicMock import pytest from autopr.actions.prompt import Inputs, PromptString from autopr.actions.utils.prompt_context import PromptContext, PromptContextEntry, trim_context from autopr.models.executable import ExecutableId from autopr.tests.mock_openai import mo...
1
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/actions/test_prompt.py
test_trim_context
assert
numeric_literal
54
import os from unittest.mock import AsyncMock, patch, MagicMock import pytest from autopr.actions.prompt import Inputs, PromptString from autopr.actions.utils.prompt_context import PromptContext, PromptContextEntry, trim_context from autopr.models.executable import ExecutableId from autopr.tests.mock_openai import mo...
3
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/actions/test_prompt.py
test_trim_context
assert
string_literal
96
import os from unittest.mock import AsyncMock, patch, MagicMock import pytest from autopr.actions.prompt import Inputs, PromptString from autopr.actions.utils.prompt_context import PromptContext, PromptContextEntry, trim_context from autopr.models.executable import ExecutableId from autopr.tests.mock_openai import mo...
"What I have in my fridge"
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/actions/test_prompt.py
test_trim_context
assert
string_literal
62
import os from unittest.mock import AsyncMock, patch, MagicMock import pytest from autopr.actions.prompt import Inputs, PromptString from autopr.actions.utils.prompt_context import PromptContext, PromptContextEntry, trim_context from autopr.models.executable import ExecutableId from autopr.tests.mock_openai import mo...
"""Flour, sugar, sal ... (trimmed) ... ar, salt, pepper, """
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/actions/test_prompt.py
test_trim_context
assert
string_literal
69
import os from unittest.mock import AsyncMock, patch, MagicMock import pytest from autopr.actions.prompt import Inputs, PromptString from autopr.actions.utils.prompt_context import PromptContext, PromptContextEntry, trim_context from autopr.models.executable import ExecutableId from autopr.tests.mock_openai import mo...
"""Milk, eggs, cheese, Milk, ... (trimmed) ... eese, Milk, eggs, cheese, """
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/actions/test_read_file.py
test_actions
assert
variable
41
import os from typing import Any, Optional import pydantic import pytest from autopr.models.executable import ContextDict, ExecutableId from autopr.tests.mock_openai import mock_openai from autopr.tests.utils import run_action_manually @pytest.mark.parametrize( "inputs, expected_output, repo_resource", [ ...
expected_output
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/actions/test_search.py
test_actions
assert
variable
103
import os from typing import Any, Optional import pydantic import pytest from autopr.models.executable import ContextDict, ExecutableId from autopr.tests.mock_openai import mock_openai from autopr.tests.utils import run_action_manually from autopr.actions.search import SearchHit @pytest.mark.parametrize( "input...
expected_output
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/actions/test_write_into_file.py
test_actions
assert
variable
41
import os from typing import Any, Optional import pydantic import pytest from autopr.models.executable import ContextDict, ExecutableId from autopr.tests.mock_openai import mock_openai from autopr.tests.utils import run_action_manually @pytest.mark.parametrize( "inputs, expected_output, repo_resource", [ ...
expected_output
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/resources/repos/example_repo_2/example_repo_2_subfolder/crawl_folder.py
test_actions
assert
variable
48
import os from typing import Any, Optional import pydantic import pytest from autopr.actions.utils.prompt_context import PromptContext, PromptContextEntry from autopr.models.executable import ContextDict, ExecutableId from autopr.tests.mock_openai import mock_openai from autopr.tests.utils import run_action_manuall...
outputs
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/resources/repos/example_repo_2/example_repo_2_subfolder/crawl_folder.py
test_actions
assert
func_call
49
import os from typing import Any, Optional import pydantic import pytest from autopr.actions.utils.prompt_context import PromptContext, PromptContextEntry from autopr.models.executable import ContextDict, ExecutableId from autopr.tests.mock_openai import mock_openai from autopr.tests.utils import run_action_manuall...
sorted(expected_ls)
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/test_actions.py
test_actions
assert
variable
114
import os from typing import Any, Optional import pydantic import pytest from autopr.actions.utils.prompt_context import PromptContext, PromptContextEntry from autopr.models.executable import ContextDict, ExecutableId from autopr.tests.mock_openai import mock_openai from autopr.tests.utils import run_action_manuall...
expected_outputs
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/test_event_triggers.py
test_event_triggers
assert
numeric_literal
104
import json from typing import Optional import pytest from autopr.models.artifacts import Issue, Message from autopr.models.events import LabelEvent, EventUnion, PushEvent, CronEvent from autopr.models.executable import ContextDict from autopr.services.platform_service import GitHubPlatformService from autopr.tests.u...
1
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/test_event_triggers.py
test_event_triggers
assert
collection
107
import json from typing import Optional import pytest from autopr.models.artifacts import Issue, Message from autopr.models.events import LabelEvent, EventUnion, PushEvent, CronEvent from autopr.models.executable import ContextDict from autopr.services.platform_service import GitHubPlatformService from autopr.tests.u...
[expected_resulting_context]
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/test_platform_service.py
test_github_platform_service
assert
numeric_literal
105
import json import os from unittest.mock import MagicMock, patch, Mock import pytest from aioresponses import aioresponses from autopr.models.artifacts import Issue, PullRequest, Message from autopr.models.events import EventUnion, LabelEvent from autopr.services.platform_service import GitHubPlatformService from aut...
1
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/test_platform_service.py
test_github_platform_service
assert
numeric_literal
109
import json import os from unittest.mock import MagicMock, patch, Mock import pytest from aioresponses import aioresponses from autopr.models.artifacts import Issue, PullRequest, Message from autopr.models.events import EventUnion, LabelEvent from autopr.services.platform_service import GitHubPlatformService from aut...
2
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/test_platform_service.py
test_github_platform_service
assert
string_literal
120
import json import os from unittest.mock import MagicMock, patch, Mock import pytest from aioresponses import aioresponses from autopr.models.artifacts import Issue, PullRequest, Message from autopr.models.events import EventUnion, LabelEvent from autopr.services.platform_service import GitHubPlatformService from aut...
'comment1'
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/test_platform_service.py
test_get_file_url
assert
variable
106
import json import os from unittest.mock import MagicMock, patch, Mock import pytest from aioresponses import aioresponses from autopr.models.artifacts import Issue, PullRequest, Message from autopr.models.events import EventUnion, LabelEvent from autopr.services.platform_service import GitHubPlatformService from aut...
expected_url
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/test_platform_service.py
test_get_latest_commit_hash
assert
variable
37
import json import os from unittest.mock import MagicMock, patch, Mock import pytest from aioresponses import aioresponses from autopr.models.artifacts import Issue, PullRequest, Message from autopr.models.events import EventUnion, LabelEvent from autopr.services.platform_service import GitHubPlatformService from aut...
expected_sha
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/test_platform_service.py
test_parse_event
assert
variable
108
import json import os from unittest.mock import MagicMock, patch, Mock import pytest from aioresponses import aioresponses from autopr.models.artifacts import Issue, PullRequest, Message from autopr.models.events import EventUnion, LabelEvent from autopr.services.platform_service import GitHubPlatformService from aut...
expected_event
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/test_platform_service.py
test_get_issue_by_title
assert
variable
59
import json import os from unittest.mock import MagicMock, patch, Mock import pytest from aioresponses import aioresponses from autopr.models.artifacts import Issue, PullRequest, Message from autopr.models.events import EventUnion, LabelEvent from autopr.services.platform_service import GitHubPlatformService from aut...
expected_issue
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/test_platform_service.py
test_github_platform_service
assert
collection
110
import json import os from unittest.mock import MagicMock, patch, Mock import pytest from aioresponses import aioresponses from autopr.models.artifacts import Issue, PullRequest, Message from autopr.models.events import EventUnion, LabelEvent from autopr.services.platform_service import GitHubPlatformService from aut...
[platform_service.PRBodySentinel, 'comment1']
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/test_platform_service.py
test_github_platform_service
assert
collection
125
import json import os from unittest.mock import MagicMock, patch, Mock import pytest from aioresponses import aioresponses from autopr.models.artifacts import Issue, PullRequest, Message from autopr.models.events import EventUnion, LabelEvent from autopr.services.platform_service import GitHubPlatformService from aut...
[ Issue( number=1, title='Ups an issue occurred.', author='user1', timestamp='2023-08-20T10:25:48Z', messages=[ Message( body='I am an issue. Resolve me.', author='user1', ) ] ) ]
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/test_trigger_spec.py
test_get_params
assert
variable
48
import os import pytest from autopr.models.config.entrypoints import get_params from autopr.triggers import get_all_triggers from autopr.workflows import get_all_workflows @pytest.mark.parametrize( "workflow_id, expected_params", [ ( "summarize_file", { "EMPTY_...
expected_params
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/test_workflows.py
test_workflow
assert
variable
240
import os from typing import Any, Optional import pytest from autopr.models.config.elements import WorkflowDefinition from autopr.models.executable import ContextDict, ExecutableId from autopr.tests.mock_openai import mock_openai from autopr.tests.utils import create_ephemeral_main_service @pytest.mark.parametrize...
expected_outputs
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
irgolic/AutoPR
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
train
train
autopr/tests/workflows/test_api_history_with_git.py
test_autogenerate_readmes
assert
variable
34
import json import os from unittest.mock import patch, Mock import git.repo import pytest from autopr.models.artifacts import PullRequest, Message from autopr.models.events import PushEvent from autopr.services.platform_service import GitHubPlatformService from autopr.tests.mock_openai import mock_openai from autopr....
mock_content
b8b2073ce20e93204248901ba8c180ec1d17fd44
27
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_comments.py
testGet
self.assertEqual
numeric_literal
58
from __future__ import unicode_literals import os import json import re import tempfile import unittest import pkg_resources from urllib.parse import urlencode from werkzeug.wrappers import Response from isso import Isso, core, config, dist from isso.utils import http from isso.views import comments from fixtures ...
1)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_comments.py
testCreateMultiple
self.assertEqual
numeric_literal
92
from __future__ import unicode_literals import os import json import re import tempfile import unittest import pkg_resources from urllib.parse import urlencode from werkzeug.wrappers import Response from isso import Isso, core, config, dist from isso.utils import http from isso.views import comments from fixtures ...
2)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_comments.py
testCreateMultiple
self.assertEqual
numeric_literal
93
from __future__ import unicode_literals import os import json import re import tempfile import unittest import pkg_resources from urllib.parse import urlencode from werkzeug.wrappers import Response from isso import Isso, core, config, dist from isso.utils import http from isso.views import comments from fixtures ...
3)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_comments.py
testGetInvalid
self.assertEqual
numeric_literal
160
from __future__ import unicode_literals import os import json import re import tempfile import unittest import pkg_resources from urllib.parse import urlencode from werkzeug.wrappers import Response from isso import Isso, core, config, dist from isso.utils import http from isso.views import comments from fixtures ...
0)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_comments.py
testDeleteWithReference
self.assertEqual
numeric_literal
241
from __future__ import unicode_literals import os import json import re import tempfile import unittest import pkg_resources from urllib.parse import urlencode from werkzeug.wrappers import Response from isso import Isso, core, config, dist from isso.utils import http from isso.views import comments from fixtures ...
4)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_comments.py
testCreateAndGetMultiple
self.assertEqual
numeric_literal
104
from __future__ import unicode_literals import os import json import re import tempfile import unittest import pkg_resources from urllib.parse import urlencode from werkzeug.wrappers import Response from isso import Isso, core, config, dist from isso.utils import http from isso.views import comments from fixtures ...
20)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_comments.py
testGetLimited
self.assertEqual
numeric_literal
180
from __future__ import unicode_literals import os import json import re import tempfile import unittest import pkg_resources from urllib.parse import urlencode from werkzeug.wrappers import Response from isso import Isso, core, config, dist from isso.utils import http from isso.views import comments from fixtures ...
10)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_config.py
test_parser
self.assertEqual
numeric_literal
23
import unittest import io from isso import config class TestConfig(unittest.TestCase): def test_parser(self): parser = config.IssoParser(allow_no_value=True) parser.read_file(io.StringIO(u""" [foo] bar = 1h baz = 12 spam = a, b, cdef bl...
12)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_config.py
test_parser
self.assertEqual
numeric_literal
22
import unittest import io from isso import config class TestConfig(unittest.TestCase): def test_parser(self): parser = config.IssoParser(allow_no_value=True) parser.read_file(io.StringIO(u""" [foo] bar = 1h baz = 12 spam = a, b, cdef bl...
3600)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_config.py
test_parser
self.assertEqual
collection
26
import unittest import io from isso import config class TestConfig(unittest.TestCase): def test_parser(self): parser = config.IssoParser(allow_no_value=True) parser.read_file(io.StringIO(u""" [foo] bar = 1h baz = 12 spam = a, b, cdef bl...
['fgh'])
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_config.py
test_parser
self.assertEqual
collection
25
import unittest import io from isso import config class TestConfig(unittest.TestCase): def test_parser(self): parser = config.IssoParser(allow_no_value=True) parser.read_file(io.StringIO(u""" [foo] bar = 1h baz = 12 spam = a, b, cdef bl...
['spam', 'ham'])
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_config.py
test_parser
self.assertEqual
collection
24
import unittest import io from isso import config class TestConfig(unittest.TestCase): def test_parser(self): parser = config.IssoParser(allow_no_value=True) parser.read_file(io.StringIO(u""" [foo] bar = 1h baz = 12 spam = a, b, cdef bl...
['a', 'b', 'cdef'])
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_cors.py
test_preflight
self.assertEqual
numeric_literal
25
from __future__ import unicode_literals import unittest from werkzeug.test import Client from werkzeug.wrappers import Response from isso.wsgi import CORSMiddleware, origin def hello_world(environ, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) return ["Hello, World."] class COR...
200)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_cors.py
test_simple
self.assertEqual
string_literal
32
from __future__ import unicode_literals import unittest from werkzeug.test import Client from werkzeug.wrappers import Response from isso.wsgi import CORSMiddleware, origin def hello_world(environ, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) return ["Hello, World."] class COR...
"true")
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_cors.py
test_simple
self.assertEqual
string_literal
38
from __future__ import unicode_literals import unittest from werkzeug.test import Client from werkzeug.wrappers import Response from isso.wsgi import CORSMiddleware, origin def hello_world(environ, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) return ["Hello, World."] class COR...
"Spam")
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_cors.py
test_simple
self.assertEqual
string_literal
36
from __future__ import unicode_literals import unittest from werkzeug.test import Client from werkzeug.wrappers import Response from isso.wsgi import CORSMiddleware, origin def hello_world(environ, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) return ["Hello, World."] class COR...
"Foo, Bar")
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_cors.py
test_preflight
self.assertIn
complex_expr
28
from __future__ import unicode_literals import unittest from werkzeug.test import Client from werkzeug.wrappers import Response from isso.wsgi import CORSMiddleware, origin def hello_world(environ, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) return ["Hello, World."] class COR...
rv.headers)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_cors.py
test_simple
self.assertEqual
string_literal
41
from __future__ import unicode_literals import unittest from werkzeug.test import Client from werkzeug.wrappers import Response from isso.wsgi import CORSMiddleware, origin def hello_world(environ, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) return ["Hello, World."] class COR...
"http://example.tld")
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_db.py
test_limit_nested_comments
self.assertEqual
variable
77
import unittest import os import sqlite3 import tempfile from isso import config from isso.db import SQLite3 class TestDBMigration(unittest.TestCase): def setUp(self): fd, self.path = tempfile.mkstemp() def tearDown(self): os.unlink(self.path) def test_limit_nested_comments(self): ...
rv)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_db.py
test_session_key_migration
self.assertEqual
string_literal
43
import unittest import os import sqlite3 import tempfile from isso import config from isso.db import SQLite3 class TestDBMigration(unittest.TestCase): def setUp(self): fd, self.path = tempfile.mkstemp() def tearDown(self): os.unlink(self.path) def test_session_key_migration(self): ...
"supersecretkey")
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_db.py
test_defaults
self.assertEqual
complex_expr
28
import unittest import os import sqlite3 import tempfile from isso import config from isso.db import SQLite3 class TestDBMigration(unittest.TestCase): def setUp(self): fd, self.path = tempfile.mkstemp() def tearDown(self): os.unlink(self.path) def test_defaults(self): conf = co...
SQLite3.MAX_VERSION)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_db.py
test_session_key_migration
self.assertEqual
func_call
35
import unittest import os import sqlite3 import tempfile from isso import config from isso.db import SQLite3 class TestDBMigration(unittest.TestCase): def setUp(self): fd, self.path = tempfile.mkstemp() def tearDown(self): os.unlink(self.path) def test_session_key_migration(self): ...
conf.get("general", "session-key"))
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_db.py
test_defaults
self.assertTrue
func_call
29
import unittest import os import sqlite3 import tempfile from isso import config from isso.db import SQLite3 class TestDBMigration(unittest.TestCase): def setUp(self): fd, self.path = tempfile.mkstemp() def tearDown(self): os.unlink(self.path) def test_defaults(self): conf = co...
db.preferences.get("session-key", "").isalnum())
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_guard.py
testRateLimit
self.assertEqual
numeric_literal
59
from __future__ import unicode_literals import unittest import json import pkg_resources import tempfile from werkzeug import __version__ from werkzeug.test import Client from werkzeug.wrappers import Response from isso import Isso, config, core from isso.utils import http from fixtures import curl, FakeIP http.cur...
403)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_guard.py
testRateLimit
self.assertEqual
numeric_literal
73
from __future__ import unicode_literals import unittest import json import pkg_resources import tempfile from werkzeug import __version__ from werkzeug.test import Client from werkzeug.wrappers import Response from isso import Isso, config, core from isso.utils import http from fixtures import curl, FakeIP http.cur...
201)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_guard.py
testRateLimit
self.assertIn
func_call
60
from __future__ import unicode_literals import unittest import json import pkg_resources import tempfile from werkzeug import __version__ from werkzeug.test import Client from werkzeug.wrappers import Response from isso import Isso, config, core from isso.utils import http from fixtures import curl, FakeIP http.cur...
rv.get_data(as_text=True))
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_html.py
test_github_flavoured_markdown
self.assertEqual
variable
26
import unittest import textwrap from isso import config from isso.utils import html class TestHTML(unittest.TestCase): def test_github_flavoured_markdown(self): convert = html.Markdown(extensions=("fenced-code", )) # without lang _in = textwrap.dedent("""\ Hello, World ...
_out)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_html.py
test_markdown
self.assertEqual
variable
18
import unittest import textwrap from isso import config from isso.utils import html class TestHTML(unittest.TestCase): def test_markdown(self): convert = html.Markdown(extensions=()) examples = [ ("*Ohai!*", "<p><em>Ohai!</em></p>"), ("<em>Hi</em>", "<p><em>Hi</em></p>"), ...
expected)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_html.py
test_render
self.assertIn
collection
20
import unittest import textwrap from isso import config from isso.utils import html class TestHTML(unittest.TestCase): def test_render(self): conf = config.new({ "markup": { "options": "autolink", "flags": "", "allowed-elements": "", ...
['<p><a href="http://example.org/" rel="nofollow noopener">http://example.org/</a> and sms:+1234567890</p>', '<p><a rel="nofollow noopener" href="http://example.org/">http://example.org/</a> and sms:+1234567890</p>'])
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_migration.py
test_disqus
self.assertEqual
numeric_literal
30
from __future__ import unicode_literals import unittest import tempfile from os.path import join, dirname from isso import config from isso.db import SQLite3 from isso.migrate import Disqus, WordPress, autodetect, Generic conf = config.new({ "general": { "dbpath": "/dev/null", "max-age": "1h" ...
2)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_migration.py
test_disqus
self.assertEqual
numeric_literal
34
from __future__ import unicode_literals import unittest import tempfile from os.path import join, dirname from isso import config from isso.db import SQLite3 from isso.migrate import Disqus, WordPress, autodetect, Generic conf = config.new({ "general": { "dbpath": "/dev/null", "max-age": "1h" ...
1)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_migration.py
test_wordpress
self.assertEqual
numeric_literal
38
from __future__ import unicode_literals import unittest import tempfile from os.path import join, dirname from isso import config from isso.db import SQLite3 from isso.migrate import Disqus, WordPress, autodetect, Generic conf = config.new({ "general": { "dbpath": "/dev/null", "max-age": "1h" ...
7)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_migration.py
test_generic
self.assertEqual
string_literal
43
from __future__ import unicode_literals import unittest import tempfile from os.path import join, dirname from isso import config from isso.db import SQLite3 from isso.migrate import Disqus, WordPress, autodetect, Generic conf = config.new({ "general": { "dbpath": "/dev/null", "max-age": "1h" ...
"")
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_migration.py
test_wordpress
self.assertEqual
none_literal
55
from __future__ import unicode_literals import unittest import tempfile from os.path import join, dirname from isso import config from isso.db import SQLite3 from isso.migrate import Disqus, WordPress, autodetect, Generic conf = config.new({ "general": { "dbpath": "/dev/null", "max-age": "1h" ...
None)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_migration.py
test_detection
self.assertEqual
variable
40
from __future__ import unicode_literals import unittest import tempfile from os.path import join, dirname from isso import config from isso.db import SQLite3 from isso.migrate import Disqus, WordPress, autodetect, Generic conf = config.new({ "general": { "dbpath": "/dev/null", "max-age": "1h" ...
Disqus)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_migration.py
test_disqus
self.assertEqual
string_literal
38
from __future__ import unicode_literals import unittest import tempfile from os.path import join, dirname from isso import config from isso.db import SQLite3 from isso.migrate import Disqus, WordPress, autodetect, Generic conf = config.new({ "general": { "dbpath": "/dev/null", "max-age": "1h" ...
"peter")
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_migration.py
test_disqus
self.assertEqual
complex_expr
43
from __future__ import unicode_literals import unittest import tempfile from os.path import join, dirname from isso import config from isso.db import SQLite3 from isso.migrate import Disqus, WordPress, autodetect, Generic conf = config.new({ "general": { "dbpath": "/dev/null", "max-age": "1h" ...
a["id"])
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_migration.py
test_detection
self.assertEqual
variable
43
from __future__ import unicode_literals import unittest import tempfile from os.path import join, dirname from isso import config from isso.db import SQLite3 from isso.migrate import Disqus, WordPress, autodetect, Generic conf = config.new({ "general": { "dbpath": "/dev/null", "max-age": "1h" ...
Generic)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_migration.py
test_detection
self.assertEqual
variable
34
from __future__ import unicode_literals import unittest import tempfile from os.path import join, dirname from isso import config from isso.db import SQLite3 from isso.migrate import Disqus, WordPress, autodetect, Generic conf = config.new({ "general": { "dbpath": "/dev/null", "max-age": "1h" ...
WordPress)
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor
isso-comments/isso
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
train
train
isso/tests/test_migration.py
test_disqus
self.assertEqual
string_literal
40
from __future__ import unicode_literals import unittest import tempfile from os.path import join, dirname from isso import config from isso.db import SQLite3 from isso.migrate import Disqus, WordPress, autodetect, Generic conf = config.new({ "general": { "dbpath": "/dev/null", "max-age": "1h" ...
"127.0.0.0")
9e021cb6263e921ac519f52b82df3f66a297d3d1
118
v2_extractor_at_anchor