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
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant/test_settings.py
test_non_accepted_issue_fetcher_given
pytest.raises
variable
11
import pytest from fastapi_azure_auth import MultiTenantAzureAuthorizationCodeBearer async def iss_callable_do_not_accept_tid_argument(t): pass @pytest.mark.parametrize('iss_callable', [None, '', True, False, 1, iss_callable_do_not_accept_tid_argument]) def test_non_accepted_issue_fetcher_given(iss_callable): ...
RuntimeError)
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant/websocket.py
test_no_keys_to_decode_with
pytest.raises
variable
56
from typing import Annotated import pytest from demo_project.api.dependencies import azure_scheme from demo_project.core.config import settings from demo_project.main import app from fastapi import Depends, FastAPI, Security, WebSocket from fastapi.testclient import TestClient from starlette.websockets import WebSocke...
WebSocketDisconnect)
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant/websocket.py
test_malformed_token
assert
string_literal
60
from typing import Annotated import pytest from demo_project.api.dependencies import azure_scheme from demo_project.core.config import settings from demo_project.main import app from fastapi import Depends, FastAPI, Security, WebSocket from fastapi.testclient import TestClient from starlette.websockets import WebSocke...
'Invalid token format'
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant/websocket.py
test_no_valid_scopes
assert
string_literal
61
from typing import Annotated import pytest from demo_project.api.dependencies import azure_scheme from demo_project.core.config import settings from demo_project.main import app from fastapi import Depends, FastAPI, Security, WebSocket from fastapi.testclient import TestClient from starlette.websockets import WebSocke...
'Required scope missing'
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant/websocket.py
test_guest_user_rejected
assert
string_literal
59
from typing import Annotated import pytest from demo_project.api.dependencies import azure_scheme from demo_project.core.config import settings from demo_project.main import app from fastapi import Depends, FastAPI, Security, WebSocket from fastapi.testclient import TestClient from starlette.websockets import WebSocke...
'Guest users not allowed'
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant/websocket.py
test_exception_raised
assert
string_literal
61
from typing import Annotated import pytest from demo_project.api.dependencies import azure_scheme from demo_project.core.config import settings from demo_project.main import app from fastapi import Depends, FastAPI, Security, WebSocket from fastapi.testclient import TestClient from starlette.websockets import WebSocke...
'Unable to process token'
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant/websocket.py
test_normal_user_rejected
assert
string_literal
61
from typing import Annotated import pytest from demo_project.api.dependencies import azure_scheme from demo_project.core.config import settings from demo_project.main import app from fastapi import Depends, FastAPI, Security, WebSocket from fastapi.testclient import TestClient from starlette.websockets import WebSocke...
'User is not an AdminUser'
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant_b2c/multi_auth/test_auto_error.py
test_api_key_valid_key
assert
collection
10
import pytest from demo_project.main import app from httpx import AsyncClient @pytest.mark.anyio async def test_api_key_valid_key(multi_tenant_app, mock_openid_and_keys, freezer): async with AsyncClient(app=app, base_url='http://test', headers={'TEST-API-KEY': 'JonasIsCool'}) as ac: response = await ac.get...
{'api_key': True, 'azure_auth': False}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant_b2c/multi_auth/test_auto_error.py
test_api_key_but_invalid_key
assert
collection
10
import pytest from demo_project.main import app from httpx import AsyncClient @pytest.mark.anyio async def test_api_key_but_invalid_key(multi_tenant_app, mock_openid_and_keys, freezer): async with AsyncClient(app=app, base_url='http://test', headers={'TEST-API-KEY': 'JonasIsNotCool'}) as ac: response = awa...
{'detail': 'You must either provide a valid bearer token or API key'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant_b2c/test_multi_tenant.py
test_guest_user_allowed_in_b2c
assert
numeric_literal
32
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
200
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant_b2c/test_multi_tenant.py
test_malformed_token
assert
collection
28
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Invalid token format'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant_b2c/test_multi_tenant.py
test_no_valid_scopes
assert
collection
29
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Required scope missing'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant_b2c/test_multi_tenant.py
test_exception_raised
assert
collection
31
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Unable to process token'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant_b2c/test_multi_tenant.py
test_normal_user_rejected
assert
collection
29
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'User is not an AdminUser'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant_b2c/test_multi_tenant.py
test_evil_token
assert
collection
30
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Unable to validate token'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant_b2c/test_multi_tenant.py
test_expired_token
assert
collection
29
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Token signature has expired'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant_b2c/test_multi_tenant.py
test_invalid_token_claims
assert
collection
29
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Token contains invalid claims'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant_b2c/test_multi_tenant.py
test_no_valid_invalid_formatted_scope
assert
collection
29
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Token contains invalid formatted scopes'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant_b2c/test_multi_tenant.py
test_no_keys_to_decode_with
assert
collection
27
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Unable to verify token, no signing keys found'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/multi_tenant_b2c/test_settings.py
test_non_accepted_issue_fetcher_given
pytest.raises
variable
11
import pytest from fastapi_azure_auth import B2CMultiTenantAuthorizationCodeBearer async def iss_callable_do_not_accept_tid_argument(t): pass @pytest.mark.parametrize('iss_callable', [None, '', True, False, 1, iss_callable_do_not_accept_tid_argument]) def test_non_accepted_issue_fetcher_given(iss_callable): ...
RuntimeError)
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/single_tenant/test_single_tenant.py
test_change_of_keys_works
assert
numeric_literal
33
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
200
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/single_tenant/test_single_tenant.py
test_malformed_token
assert
collection
27
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Invalid token format'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/single_tenant/test_single_tenant.py
test_no_valid_scopes
assert
collection
28
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Required scope missing'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/single_tenant/test_single_tenant.py
test_guest_user_rejected
assert
collection
28
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Guest users not allowed'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/single_tenant/test_single_tenant.py
test_exception_raised
assert
collection
29
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Unable to process token'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/single_tenant/test_single_tenant.py
test_normal_user_rejected
assert
collection
28
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'User is not an AdminUser'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/single_tenant/test_single_tenant.py
test_evil_token
assert
collection
29
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Unable to validate token'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/single_tenant/test_single_tenant.py
test_expired_token
assert
collection
28
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Token signature has expired'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/single_tenant/test_single_tenant.py
test_invalid_token_claims
assert
collection
28
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Token contains invalid claims'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/single_tenant/test_single_tenant.py
test_no_valid_invalid_formatted_scope
assert
collection
28
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Token contains invalid formatted scopes'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/single_tenant/test_single_tenant.py
test_no_keys_to_decode_with
assert
collection
26
import time from datetime import datetime, timedelta import pytest from demo_project.main import app from httpx import AsyncClient from tests.utils import ( build_access_token, build_access_token_expired, build_access_token_guest_user, build_access_token_invalid_claims, build_access_token_invalid_s...
{'detail': 'Unable to verify token, no signing keys found'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/test_openapi_scheme.py
test_openapi_schema
assert
numeric_literal
444
import fastapi import openapi_spec_validator import pydantic import pytest from demo_project.main import app from fastapi.testclient import TestClient from packaging import version openapi_schema = { 'openapi': '3.1.0', 'info': { 'title': 'My Project', 'description': '## Welcome to my API! \n T...
200
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/test_openapi_scheme.py
test_no_token
assert
numeric_literal
438
import fastapi import openapi_spec_validator import pydantic import pytest from demo_project.main import app from fastapi.testclient import TestClient from packaging import version openapi_schema = { 'openapi': '3.1.0', 'info': { 'title': 'My Project', 'description': '## Welcome to my API! \n T...
401
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/test_openapi_scheme.py
test_openapi_schema
assert
variable
446
import fastapi import openapi_spec_validator import pydantic import pytest from demo_project.main import app from fastapi.testclient import TestClient from packaging import version openapi_schema = { 'openapi': '3.1.0', 'info': { 'title': 'My Project', 'description': '## Welcome to my API! \n T...
openapi_schema
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/test_openapi_scheme.py
test_no_token
assert
collection
439
import fastapi import openapi_spec_validator import pydantic import pytest from demo_project.main import app from fastapi.testclient import TestClient from packaging import version openapi_schema = { 'openapi': '3.1.0', 'info': { 'title': 'My Project', 'description': '## Welcome to my API! \n T...
{'detail': 'Not authenticated'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/test_openapi_scheme.py
test_token
assert
collection
439
import fastapi import openapi_spec_validator import pydantic import pytest from demo_project.main import app from fastapi.testclient import TestClient from packaging import version openapi_schema = { 'openapi': '3.1.0', 'info': { 'title': 'My Project', 'description': '## Welcome to my API! \n T...
{'detail': 'Invalid token format'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/test_provider_config.py
test_app_id_provided
assert
numeric_literal
23
from datetime import datetime, timedelta import pytest from asgi_lifespan import LifespanManager from demo_project.api.dependencies import azure_scheme from demo_project.main import app from httpx import AsyncClient from tests.utils import build_access_token, build_openid_keys, openid_configuration from fastapi_azure...
2
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/test_provider_config.py
test_http_error_no_config_cause_crash_on_startup
pytest.raises
variable
18
from datetime import datetime, timedelta import pytest from asgi_lifespan import LifespanManager from demo_project.api.dependencies import azure_scheme from demo_project.main import app from httpx import AsyncClient from tests.utils import build_access_token, build_openid_keys, openid_configuration from fastapi_azure...
RuntimeError)
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/test_provider_config.py
test_http_error_old_config_found
assert
collection
24
from datetime import datetime, timedelta import pytest from asgi_lifespan import LifespanManager from demo_project.api.dependencies import azure_scheme from demo_project.main import app from httpx import AsyncClient from tests.utils import build_access_token, build_openid_keys, openid_configuration from fastapi_azure...
{'detail': 'Connection to Azure AD is down. Unable to fetch provider configuration'}
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/test_user.py
test_user_missing_optionals
assert
none_literal
28
import calendar import datetime from typing import Dict import pytest from fastapi_azure_auth.user import User from fastapi_azure_auth.utils import is_guest def get_utc_now_as_unix_timestamp() -> int: date = datetime.datetime.utcnow() return calendar.timegm(date.utctimetuple()) def test_user_missing_optiona...
None
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
intility/fastapi-azure-auth
89e58ea31248c703d99dd4161739839bddf0f873
31
train
train
tests/test_user.py
test_guest_user
assert
variable
84
import calendar import datetime from typing import Dict import pytest from fastapi_azure_auth.user import User from fastapi_azure_auth.utils import is_guest @pytest.mark.parametrize( 'claims, expected', ( [ { # v1 appreg 'iss': 'https://sts.windows.net/9b5ff18e-53c0-45a2-...
expected
89e58ea31248c703d99dd4161739839bddf0f873
31
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_cli.py
test_output_format_date_json
self.assertTrue
bool_literal
48
import datetime import os import json import shutil import csv from xml.dom import minidom import unittest import pkg_resources from invoice2data.main import create_parser, main from invoice2data.extract.loader import read_templates from .common import get_sample_files, exclude_template, inputparser_specific def ha...
False)
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_cli.py
test_copy
self.assertEqual
func_call
55
import datetime import os import json import shutil import csv from xml.dom import minidom import unittest import pkg_resources from invoice2data.main import create_parser, main from invoice2data.extract.loader import read_templates from .common import get_sample_files, exclude_template, inputparser_specific def ha...
len(test_list))
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_cli.py
test_output_name
self.assertTrue
func_call
43
import datetime import os import json import shutil import csv from xml.dom import minidom import unittest import pkg_resources from invoice2data.main import create_parser, main from invoice2data.extract.loader import read_templates from .common import get_sample_files, exclude_template, inputparser_specific def ha...
os.path.exists(test_file))
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_cli.py
test_copy_with_default_filename_format
self.assertTrue
func_call
76
import datetime import os import json import shutil import csv from xml.dom import minidom import unittest import pkg_resources from invoice2data.main import create_parser, main from invoice2data.extract.loader import read_templates from .common import get_sample_files, exclude_template, inputparser_specific def ha...
all(os.path.exists(os.path.join(copy_dir, v['output_fname'])) for k, v in data.items()))
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_extraction.py
test_custom_invoices
self.assertTrue
complex_expr
38
import datetime import json import unittest import pkg_resources import os from invoice2data.main import extract_data from invoice2data.extract.loader import read_templates class TestExtraction(unittest.TestCase): def setUp(self): self.templates = read_templates() def _run_test_on_folder(self, folder...
res == ref_json)
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_invoice_template.py
test_replace_a_with_b
self.assertEqual
string_literal
27
import unittest from invoice2data.extract.invoice_template import InvoiceTemplate class TestInvoiceTemplateMethods(unittest.TestCase): def test_replace_a_with_b(self): OPTIONS_TEST = { "currency": "EUR", "date_formats": [], "languages": ["aa"], "decimal_separ...
"b")
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_invoice_template.py
test_template_with_exclude_keyword_is_not_matched
assert
bool_literal
17
import unittest from invoice2data.extract.invoice_template import InvoiceTemplate def test_template_with_exclude_keyword_is_not_matched(): optimized_str = "Basic Test Which should not pass because of the word Exclude_this" InvoiceTempl = InvoiceTemplate( [ ("keywords", ["Basic Test"]), ...
False
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_invoice_template.py
test_lowercase
self.assertEqual
string_literal
28
import unittest from invoice2data.extract.invoice_template import InvoiceTemplate class TestInvoiceTemplateMethods(unittest.TestCase): def test_lowercase(self): OPTIONS_TEST = { "currency": "EUR", "date_formats": [], "languages": ["aa"], "decimal_separator":...
"Lowercase test failed")
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_invoice_template.py
test_remove_whitespace
self.assertEqual
string_literal
28
import unittest from invoice2data.extract.invoice_template import InvoiceTemplate class TestInvoiceTemplateMethods(unittest.TestCase): def test_remove_whitespace(self): OPTIONS_TEST = { "currency": "EUR", "date_formats": [], "languages": ["aa"], "decimal_sep...
"remove whitespace test failed")
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_invoice_template.py
test_remove_accents
self.assertEqual
string_literal
28
import unittest from invoice2data.extract.invoice_template import InvoiceTemplate class TestInvoiceTemplateMethods(unittest.TestCase): def test_remove_accents(self): OPTIONS_TEST = { "currency": "EUR", "date_formats": [], "languages": ["aa"], "decimal_separa...
"Remove accents function failed, output not equal")
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_lib.py
test_have_ocrmypdf_unavailable
self.assertFalse
variable
32
import os import unittest from unittest import mock from invoice2data.main import extract_data from invoice2data.input import pdftotext, tesseract, pdfminer_wrapper, pdfplumber, ocrmypdf from invoice2data.output import to_csv, to_json, to_xml from .common import get_sample_files def have_pdfplumber(): try: ...
have)
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_lib.py
test_tesseract_for_return
self.assertTrue
bool_literal
34
import os import unittest from unittest import mock from invoice2data.main import extract_data from invoice2data.input import pdftotext, tesseract, pdfminer_wrapper, pdfplumber, ocrmypdf from invoice2data.output import to_csv, to_json, to_xml from .common import get_sample_files def have_pdfplumber(): try: ...
True)
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_lib.py
test_extract_data_pdftotext
self.assertTrue
bool_literal
36
import os import unittest from unittest import mock from invoice2data.main import extract_data from invoice2data.input import pdftotext, tesseract, pdfminer_wrapper, pdfplumber, ocrmypdf from invoice2data.output import to_csv, to_json, to_xml from .common import get_sample_files def have_pdfplumber(): try: ...
False)
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_lib.py
test_extract_data_pdfminer
self.assertTrue
func_call
38
import os import unittest from unittest import mock from invoice2data.main import extract_data from invoice2data.input import pdftotext, tesseract, pdfminer_wrapper, pdfplumber, ocrmypdf from invoice2data.output import to_csv, to_json, to_xml from .common import get_sample_files def have_pdfplumber(): try: ...
type(res) is str)
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_lib.py
test_extract_data
self.assertTrue
func_call
32
import os import unittest from unittest import mock from invoice2data.main import extract_data from invoice2data.input import pdftotext, tesseract, pdfminer_wrapper, pdfplumber, ocrmypdf from invoice2data.output import to_csv, to_json, to_xml from .common import get_sample_files def have_pdfplumber(): try: ...
type(res) is dict)
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_lib.py
test_output_json
self.assertTrue
func_call
33
import os import unittest from unittest import mock from invoice2data.main import extract_data from invoice2data.input import pdftotext, tesseract, pdfminer_wrapper, pdfplumber, ocrmypdf from invoice2data.output import to_csv, to_json, to_xml from .common import get_sample_files def have_pdfplumber(): try: ...
os.path.exists(file_path))
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_loader.py
test_template_with_missing_keywords_is_not_loaded
assert
collection
24
import shutil from pathlib import Path import os import pytest from invoice2data.extract.invoice_template import InvoiceTemplate from invoice2data.extract.loader import read_templates def templatedirectory() -> Path: templatedirectory = Path("tests/templatedirectory/") templatedirectory.mkdir(parents=True) ...
[]
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_loader.py
test_template_with_single_specialchar_is_loaded
assert
string_literal
25
import shutil from pathlib import Path import os import pytest from invoice2data.extract.invoice_template import InvoiceTemplate from invoice2data.extract.loader import read_templates def templatedirectory() -> Path: templatedirectory = Path("tests/templatedirectory/") templatedirectory.mkdir(parents=True) ...
"ä"
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_loader.py
test_default_templates_are_loaded
assert
variable
27
import shutil from pathlib import Path import os import pytest from invoice2data.extract.invoice_template import InvoiceTemplate from invoice2data.extract.loader import read_templates def templatedirectory() -> Path: templatedirectory = Path("tests/templatedirectory/") templatedirectory.mkdir(parents=True) ...
qty_templ_files
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
invoice-x/invoice2data
cc06f0818d3f242da078c31d0fb897323333daff
33
train
train
tests/test_loader.py
test_template_name_is_yaml_filename
assert
string_literal
25
import shutil from pathlib import Path import os import pytest from invoice2data.extract.invoice_template import InvoiceTemplate from invoice2data.extract.loader import read_templates def templatedirectory() -> Path: templatedirectory = Path("tests/templatedirectory/") templatedirectory.mkdir(parents=True) ...
"thisnameisimportant.yml"
cc06f0818d3f242da078c31d0fb897323333daff
33
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/integration_minimal_test.py
test_linuxprivesc
assert
bool_literal
35
from typing import Tuple from hackingBuddyGPT.usecases.examples.agent import ExPrivEscLinux, ExPrivEscLinuxUseCase from hackingBuddyGPT.usecases.examples.agent_with_state import ExPrivEscLinuxTemplated, ExPrivEscLinuxTemplatedUseCase from hackingBuddyGPT.usecases.privesc.linux import LinuxPrivesc, LinuxPrivescUseCase f...
True
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_llm_handler.py
test_add_created_object_limit
self.assertEqual
numeric_literal
19
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 = L...
7)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_llm_handler.py
test_get_created_objects
self.assertIn
variable
19
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 = L...
created_objects)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_llm_handler.py
test_get_created_objects
self.assertIn
complex_expr
20
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 = L...
created_objects[object_type])
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_llm_handler.py
test_add_created_object
self.assertIn
complex_expr
18
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 = L...
self.llm_handler.created_objects)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_llm_handler.py
test_add_created_object
self.assertIn
complex_expr
19
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 = L...
self.llm_handler.created_objects[object_type])
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openAPI_specification_manager.py
test_write_openapi_to_yaml
assert_*
string_literal
19
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.capabilities.http_request import HTTPRequest from hackingBuddyGPT.usecases.web_api_testing.documentation.openapi_specification_handler import OpenAPISpecificationHandler class TestSpecificationHandler(unittest.TestCase): def setUp(sel...
'w')
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openAPI_specification_manager.py
test_write_openapi_to_yaml
self.assertEqual
collection
43
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.capabilities.http_request import HTTPRequest from hackingBuddyGPT.usecases.web_api_testing.documentation.openapi_specification_handler import OpenAPISpecificationHandler class TestSpecificationHandler(unittest.TestCase): def setUp(sel...
["/test"])
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openAPI_specification_manager.py
test_write_openapi_to_yaml
self.assertEqual
string_literal
41
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.capabilities.http_request import HTTPRequest from hackingBuddyGPT.usecases.web_api_testing.documentation.openapi_specification_handler import OpenAPISpecificationHandler class TestSpecificationHandler(unittest.TestCase): def setUp(sel...
"GET operation on /test")
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openAPI_specification_manager.py
test_write_openapi_to_yaml
assert_*
complex_expr
18
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.capabilities.http_request import HTTPRequest from hackingBuddyGPT.usecases.web_api_testing.documentation.openapi_specification_handler import OpenAPISpecificationHandler class TestSpecificationHandler(unittest.TestCase): def setUp(sel...
self.doc_handler.file_path)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openAPI_specification_manager.py
test_write_openapi_to_yaml
self.assertIn
complex_expr
39
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.capabilities.http_request import HTTPRequest from hackingBuddyGPT.usecases.web_api_testing.documentation.openapi_specification_handler import OpenAPISpecificationHandler class TestSpecificationHandler(unittest.TestCase): def setUp(sel...
self.doc_handler.openapi_spec["endpoints"])
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openAPI_specification_manager.py
test_partial_match
self.assertTrue
func_call
16
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.capabilities.http_request import HTTPRequest from hackingBuddyGPT.usecases.web_api_testing.documentation.openapi_specification_handler import OpenAPISpecificationHandler class TestSpecificationHandler(unittest.TestCase): def setUp(sel...
self.doc_handler.is_partial_match("test", string_list))
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openAPI_specification_manager.py
test_partial_match
self.assertFalse
func_call
17
import unittest from unittest.mock import MagicMock, patch from hackingBuddyGPT.capabilities.http_request import HTTPRequest from hackingBuddyGPT.usecases.web_api_testing.documentation.openapi_specification_handler import OpenAPISpecificationHandler class TestSpecificationHandler(unittest.TestCase): def setUp(sel...
self.doc_handler.is_partial_match("not_in_list", string_list))
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openapi_converter.py
test_convert_file_yaml_to_json
assert_*
string_literal
25
import unittest from unittest.mock import patch, mock_open import os from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing.openapi_converter import OpenAPISpecificationConverter class TestOpenAPISpecificationConverter(unittest.TestCase): def setUp(self): self.converter = OpenAPISpecification...
'r')
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openapi_converter.py
test_convert_file_yaml_to_json
assert_*
string_literal
27
import unittest from unittest.mock import patch, mock_open import os from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing.openapi_converter import OpenAPISpecificationConverter class TestOpenAPISpecificationConverter(unittest.TestCase): def setUp(self): self.converter = OpenAPISpecification...
'w')
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openapi_converter.py
test_convert_file_yaml_to_json_error
self.assertIsNone
variable
26
import unittest from unittest.mock import patch, mock_open import os from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing.openapi_converter import OpenAPISpecificationConverter class TestOpenAPISpecificationConverter(unittest.TestCase): def setUp(self): self.converter = OpenAPISpecification...
result)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openapi_converter.py
test_convert_file_yaml_to_json
assert_*
func_call
28
import unittest from unittest.mock import patch, mock_open import os from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing.openapi_converter import OpenAPISpecificationConverter class TestOpenAPISpecificationConverter(unittest.TestCase): def setUp(self): self.converter = OpenAPISpecification...
mock_open_file())
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openapi_converter.py
test_convert_file_yaml_to_json
self.assertEqual
variable
30
import unittest from unittest.mock import patch, mock_open import os from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing.openapi_converter import OpenAPISpecificationConverter class TestOpenAPISpecificationConverter(unittest.TestCase): def setUp(self): self.converter = OpenAPISpecification...
expected_output_path)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openapi_converter.py
test_convert_file_yaml_to_json
assert_*
func_call
29
import unittest from unittest.mock import patch, mock_open import os from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing.openapi_converter import OpenAPISpecificationConverter class TestOpenAPISpecificationConverter(unittest.TestCase): def setUp(self): self.converter = OpenAPISpecification...
os.path.join("base_directory", output_directory))
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openapi_parser.py
test_load_yaml
self.assertEqual
numeric_literal
71
import unittest from unittest.mock import patch, mock_open import yaml from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing import OpenAPISpecificationParser class TestOpenAPISpecificationParser(unittest.TestCase): def setUp(self): self.filepath = "dummy_path.yaml" self.yaml_content...
2)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openapi_parser.py
test_load_yaml
self.assertEqual
string_literal
70
import unittest from unittest.mock import patch, mock_open import yaml from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing import OpenAPISpecificationParser class TestOpenAPISpecificationParser(unittest.TestCase): def setUp(self): self.filepath = "dummy_path.yaml" self.yaml_content...
"1.0.0")
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openapi_parser.py
test_load_yaml
self.assertEqual
string_literal
69
import unittest from unittest.mock import patch, mock_open import yaml from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing import OpenAPISpecificationParser class TestOpenAPISpecificationParser(unittest.TestCase): def setUp(self): self.filepath = "dummy_path.yaml" self.yaml_content...
"Sample API")
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openapi_parser.py
test_get_paths
self.assertEqual
variable
100
import unittest from unittest.mock import patch, mock_open import yaml from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing import OpenAPISpecificationParser class TestOpenAPISpecificationParser(unittest.TestCase): def setUp(self): self.filepath = "dummy_path.yaml" self.yaml_content...
expected_paths)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openapi_parser.py
test_get_operations
self.assertEqual
variable
88
import unittest from unittest.mock import patch, mock_open import yaml from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing import OpenAPISpecificationParser class TestOpenAPISpecificationParser(unittest.TestCase): def setUp(self): self.filepath = "dummy_path.yaml" self.yaml_content...
expected_operations)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openapi_parser.py
test_print_api_details
assert_*
string_literal
74
import unittest from unittest.mock import patch, mock_open import yaml from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing import OpenAPISpecificationParser class TestOpenAPISpecificationParser(unittest.TestCase): def setUp(self): self.filepath = "dummy_path.yaml" self.yaml_content...
"\nAvailable Paths and Operations:")
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_openapi_parser.py
test_get_servers
self.assertEqual
collection
70
import unittest from unittest.mock import patch, mock_open import yaml from hackingBuddyGPT.usecases.web_api_testing.documentation.parsing import OpenAPISpecificationParser class TestOpenAPISpecificationParser(unittest.TestCase): def setUp(self): self.filepath = "dummy_path.yaml" self.yaml_content...
["https://api.example.com", "https://staging.api.example.com"])
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_prompt_engineer_documentation.py
test_generate_prompt_tree_of_thought
self.assertEqual
numeric_literal
39
import unittest from unittest.mock import MagicMock from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.prompt_engineer import PromptStrategy, PromptEngineer from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.information.prompt_information import PromptContext from openai.types.chat import Chat...
3)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_prompt_engineer_documentation.py
test_generate_prompt_chain_of_thought
self.assertEqual
func_call
27
import unittest from unittest.mock import MagicMock from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.prompt_engineer import PromptStrategy, PromptEngineer from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.information.prompt_information import PromptContext from openai.types.chat import Chat...
len(prompt_history))
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_prompt_engineer_documentation.py
test_in_context_learning_no_hint
self.assertEqual
complex_expr
24
import unittest from unittest.mock import MagicMock from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.prompt_engineer import PromptStrategy, PromptEngineer from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.information.prompt_information import PromptContext from openai.types.chat import Chat...
actual_prompt[1]["content"])
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_prompt_engineer_testing.py
test_generate_prompt_tree_of_thought
self.assertEqual
numeric_literal
39
import unittest from unittest.mock import MagicMock from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.prompt_engineer import PromptStrategy, PromptEngineer from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.information.prompt_information import PromptContext from openai.types.chat import Chat...
3)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_prompt_engineer_testing.py
test_generate_prompt_chain_of_thought
self.assertEqual
func_call
27
import unittest from unittest.mock import MagicMock from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.prompt_engineer import PromptStrategy, PromptEngineer from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.information.prompt_information import PromptContext from openai.types.chat import Chat...
len(prompt_history))
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_prompt_engineer_testing.py
test_in_context_learning_no_hint
self.assertEqual
complex_expr
24
import unittest from unittest.mock import MagicMock from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.prompt_engineer import PromptStrategy, PromptEngineer from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.information.prompt_information import PromptContext from openai.types.chat import Chat...
actual_prompt[1]["content"])
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_prompt_generation_helper.py
test_check_prompt
self.assertEqual
variable
16
import unittest from unittest.mock import MagicMock from hackingBuddyGPT.usecases.web_api_testing.prompt_generation.prompt_generation_helper import PromptGenerationHelper class TestPromptHelper(unittest.TestCase): def setUp(self): self.response_handler = MagicMock() self.prompt_helper = PromptGener...
prompt)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_analyzer.py
test_parse_http_response
self.assertEqual
numeric_literal
31
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):...
404)
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
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):...
'Empty')
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_analyzer.py
test_analyze_input_validation
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):...
'Error')
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_analyzer.py
test_analyze_input_validation
self.assertIn
variable
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)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_analyzer.py
test_analyze_authentication_authorization
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):...
'Unknown')
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor
ipa-lab/hackingBuddyGPT
550a5173195f4b560f639d2cf1aff304c110ed28
6
train
train
tests/test_response_analyzer.py
test_print_analysis
self.assertIn
variable
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_str)
550a5173195f4b560f639d2cf1aff304c110ed28
6
v2_extractor_at_anchor