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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
asteroid-team/asteroid | b13741e36256deebbbdc3e6f42a8564b5259a3fb | 93 | train | train | tests/utils/utils_test.py | test_namespace_dic | assert | complex_expr | 26 | import itertools
import argparse
from collections.abc import MutableMapping
import torch
from torch.testing import assert_allclose
import pytest
import numpy as np
from asteroid import utils
from asteroid.utils import prepare_parser_from_dict, parse_args_as_dict
def parser():
# Create dictionary as from .yml file... | plain_args.main_key | b13741e36256deebbbdc3e6f42a8564b5259a3fb | 93 | v2_extractor_at_anchor |
asteroid-team/asteroid | b13741e36256deebbbdc3e6f42a8564b5259a3fb | 93 | train | train | tests/utils/utils_test.py | test_get_start_stop | assert | func_call | 29 | import itertools
import argparse
from collections.abc import MutableMapping
import torch
from torch.testing import assert_allclose
import pytest
import numpy as np
from asteroid import utils
from asteroid.utils import prepare_parser_from_dict, parse_args_as_dict
def parser():
# Create dictionary as from .yml file... | max(1, sig_len - desired) | b13741e36256deebbbdc3e6f42a8564b5259a3fb | 93 | v2_extractor_at_anchor |
asteroid-team/asteroid | b13741e36256deebbbdc3e6f42a8564b5259a3fb | 93 | train | train | tests/utils/utils_test.py | test_get_start_stop | assert | func_call | 32 | import itertools
import argparse
from collections.abc import MutableMapping
import torch
from torch.testing import assert_allclose
import pytest
import numpy as np
from asteroid import utils
from asteroid.utils import prepare_parser_from_dict, parse_args_as_dict
def parser():
# Create dictionary as from .yml file... | start + min(sig_len, desired) | b13741e36256deebbbdc3e6f42a8564b5259a3fb | 93 | v2_extractor_at_anchor |
asteroid-team/asteroid | b13741e36256deebbbdc3e6f42a8564b5259a3fb | 93 | train | train | tests/utils/utils_test.py | test_unet_decoder_args | assert | collection | 30 | import itertools
import argparse
from collections.abc import MutableMapping
import torch
from torch.testing import assert_allclose
import pytest
import numpy as np
from asteroid import utils
from asteroid.utils import prepare_parser_from_dict, parse_args_as_dict
def parser():
# Create dictionary as from .yml file... | ( (1 * d, c, "ks3", "st3", "pad3"), (1 * c, b, "ks2", "st2", "pad2"), (1 * b, a, "ks1", "st1", "pad1"), ) | b13741e36256deebbbdc3e6f42a8564b5259a3fb | 93 | v2_extractor_at_anchor |
asteroid-team/asteroid | b13741e36256deebbbdc3e6f42a8564b5259a3fb | 93 | train | train | tests/utils/utils_test.py | test_unet_decoder_args | assert | collection | 35 | import itertools
import argparse
from collections.abc import MutableMapping
import torch
from torch.testing import assert_allclose
import pytest
import numpy as np
from asteroid import utils
from asteroid.utils import prepare_parser_from_dict, parse_args_as_dict
def parser():
# Create dictionary as from .yml file... | ( (1 * d, c, "ks3", "st3", "pad3"), (2 * c, b, "ks2", "st2", "pad2"), (2 * b, a, "ks1", "st1", "pad1"), ) | b13741e36256deebbbdc3e6f42a8564b5259a3fb | 93 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_base.py | test_post_includes_telemetry | self.assertEqual | numeric_literal | 24 | import base64
import json
import sys
import unittest
from unittest import mock
import requests
from ...authentication.base import AuthenticationBase
from ...exceptions import Auth0Error, RateLimitError
class TestBase(unittest.TestCase):
@mock.patch("requests.post")
def test_post_includes_telemetry(self, moc... | 1) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_base.py | test_post_rate_limit_error | self.assertEqual | numeric_literal | 36 | import base64
import json
import sys
import unittest
from unittest import mock
import requests
from ...authentication.base import AuthenticationBase
from ...exceptions import Auth0Error, RateLimitError
class TestBase(unittest.TestCase):
@mock.patch("requests.post")
def test_post_rate_limit_error(self, mock_... | 9) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_token_verifier.py | test_get_jwks_json_twice_on_cache_expired | self.assertEqual | numeric_literal | 73 | import json
import time
import unittest
from unittest.mock import MagicMock, patch
import jwt
from ...authentication.token_verifier import (
AsymmetricSignatureVerifier,
JwksFetcher,
SignatureVerifier,
SymmetricSignatureVerifier,
TokenVerifier,
)
from ...exceptions import TokenValidationError
RSA... | 1) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_token_verifier.py | test_get_jwks_json_twice_on_cache_expired | self.assertEqual | numeric_literal | 83 | import json
import time
import unittest
from unittest.mock import MagicMock, patch
import jwt
from ...authentication.token_verifier import (
AsymmetricSignatureVerifier,
JwksFetcher,
SignatureVerifier,
SymmetricSignatureVerifier,
TokenVerifier,
)
from ...exceptions import TokenValidationError
RSA... | 2) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_logs.py | test_search | self.assertEqual | numeric_literal | 25 | import unittest
from unittest import mock
from ...management.logs import Logs
class TestLogs(unittest.TestCase):
@mock.patch("auth0.management.logs.RestClient")
def test_search(self, mock_rc):
mock_instance = mock_rc.return_value
logs = Logs(domain="domain", token="jwttoken")
logs.se... | 0) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_logs.py | test_search | self.assertEqual | numeric_literal | 36 | import unittest
from unittest import mock
from ...management.logs import Logs
class TestLogs(unittest.TestCase):
@mock.patch("auth0.management.logs.RestClient")
def test_search(self, mock_rc):
mock_instance = mock_rc.return_value
logs = Logs(domain="domain", token="jwttoken")
logs.se... | 2) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_rest.py | test_options_are_created_by_default | self.assertEqual | numeric_literal | 37 | import base64
import json
import sys
import unittest
from unittest import mock
import requests
from auth0.rest import RestClient, RestClientOptions
from ...exceptions import Auth0Error, RateLimitError
class TestRest(unittest.TestCase):
def test_options_are_created_by_default(self):
"""
This tes... | 3) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_rest.py | test_get_rate_limit_error | self.assertEqual | numeric_literal | 39 | import base64
import json
import sys
import unittest
from unittest import mock
import requests
from auth0.rest import RestClient, RestClientOptions
from ...exceptions import Auth0Error, RateLimitError
class TestRest(unittest.TestCase):
@mock.patch("requests.get")
def test_get_rate_limit_error(self, mock_ge... | 9) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_rest.py | test_get_rate_limit_error | self.assertEqual | numeric_literal | 41 | import base64
import json
import sys
import unittest
from unittest import mock
import requests
from auth0.rest import RestClient, RestClientOptions
from ...exceptions import Auth0Error, RateLimitError
class TestRest(unittest.TestCase):
@mock.patch("requests.get")
def test_get_rate_limit_error(self, mock_ge... | 0) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_rest.py | test_get_rate_limit_error_without_headers | self.assertEqual | numeric_literal | 36 | import base64
import json
import sys
import unittest
from unittest import mock
import requests
from auth0.rest import RestClient, RestClientOptions
from ...exceptions import Auth0Error, RateLimitError
class TestRest(unittest.TestCase):
@mock.patch("requests.get")
def test_get_rate_limit_error_without_heade... | 1) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_rest.py | test_get_rate_limit_custom_retries | self.assertEqual | numeric_literal | 41 | import base64
import json
import sys
import unittest
from unittest import mock
import requests
from auth0.rest import RestClient, RestClientOptions
from ...exceptions import Auth0Error, RateLimitError
class TestRest(unittest.TestCase):
@mock.patch("requests.get")
def test_get_rate_limit_custom_retries(self... | 5) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_users.py | test_get_log_events | self.assertEqual | numeric_literal | 18 | import unittest
from unittest import mock
from ...management.users import Users
class TestUsers(unittest.TestCase):
@mock.patch("auth0.management.users.RestClient")
def test_get_log_events(self, mock_rc):
mock_instance = mock_rc.return_value
u = Users(domain="domain", token="jwttoken")
... | 0) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test_async/test_async_token_verifier.py | test_async_get_jwks_json_twice_on_cache_expired | self.assertEqual | numeric_literal | 81 | import time
import unittest
from unittest.mock import ANY
import jwt
from aioresponses import aioresponses
from callee import Attrs
from cryptography.hazmat.primitives import serialization
from .. import TokenValidationError
from ..authentication.async_token_verifier import (
AsyncAsymmetricSignatureVerifier,
... | 1) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test_async/test_async_token_verifier.py | test_async_get_jwks_json_twice_on_cache_expired | self.assertEqual | numeric_literal | 97 | import time
import unittest
from unittest.mock import ANY
import jwt
from aioresponses import aioresponses
from callee import Attrs
from cryptography.hazmat.primitives import serialization
from .. import TokenValidationError
from ..authentication.async_token_verifier import (
AsyncAsymmetricSignatureVerifier,
... | 2) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_base.py | test_post_rate_limit_error_without_headers | self.assertEqual | numeric_literal | 32 | import base64
import json
import sys
import unittest
from unittest import mock
import requests
from ...authentication.base import AuthenticationBase
from ...exceptions import Auth0Error, RateLimitError
class TestBase(unittest.TestCase):
@mock.patch("requests.post")
def test_post_rate_limit_error_without_hea... | -1) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_auth0.py | test_args | self.assertEqual | numeric_literal | 45 | import unittest
from ...management.actions import Actions
from ...management.attack_protection import AttackProtection
from ...management.auth0 import Auth0
from ...management.blacklists import Blacklists
from ...management.client_credentials import ClientCredentials
from ...management.client_grants import ClientGrant... | 99) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_logs.py | test_search | self.assertEqual | numeric_literal | 24 | import unittest
from unittest import mock
from ...management.logs import Logs
class TestLogs(unittest.TestCase):
@mock.patch("auth0.management.logs.RestClient")
def test_search(self, mock_rc):
mock_instance = mock_rc.return_value
logs = Logs(domain="domain", token="jwttoken")
logs.se... | 50) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_rest.py | test_options_are_used_and_override | self.assertEqual | numeric_literal | 34 | import base64
import json
import sys
import unittest
from unittest import mock
import requests
from auth0.rest import RestClient, RestClientOptions
from ...exceptions import Auth0Error, RateLimitError
class TestRest(unittest.TestCase):
def test_options_are_used_and_override(self):
"""
This test ... | 10) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_rest.py | test_get_rate_limit_error_without_headers | self.assertEqual | numeric_literal | 34 | import base64
import json
import sys
import unittest
from unittest import mock
import requests
from auth0.rest import RestClient, RestClientOptions
from ...exceptions import Auth0Error, RateLimitError
class TestRest(unittest.TestCase):
@mock.patch("requests.get")
def test_get_rate_limit_error_without_heade... | -1) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_base.py | test_post_error_with_no_response_text | self.assertEqual | string_literal | 28 | import base64
import json
import sys
import unittest
from unittest import mock
import requests
from ...authentication.base import AuthenticationBase
from ...exceptions import Auth0Error, RateLimitError
class TestBase(unittest.TestCase):
@mock.patch("requests.post")
def test_post_error_with_no_response_text(... | "") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_rest.py | test_get | self.assertEqual | string_literal | 42 | import base64
import json
import sys
import unittest
from unittest import mock
import requests
from auth0.rest import RestClient, RestClientOptions
from ...exceptions import Auth0Error, RateLimitError
class TestRest(unittest.TestCase):
@mock.patch("requests.get")
def test_get(self, mock_get):
rc = ... | "") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_base.py | test_post_includes_telemetry | self.assertEqual | string_literal | 29 | import base64
import json
import sys
import unittest
from unittest import mock
import requests
from ...authentication.base import AuthenticationBase
from ...exceptions import Auth0Error, RateLimitError
class TestBase(unittest.TestCase):
@mock.patch("requests.post")
def test_post_includes_telemetry(self, moc... | "d") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_base.py | test_post_rate_limit_error | self.assertEqual | string_literal | 33 | import base64
import json
import sys
import unittest
from unittest import mock
import requests
from ...authentication.base import AuthenticationBase
from ...exceptions import Auth0Error, RateLimitError
class TestBase(unittest.TestCase):
@mock.patch("requests.post")
def test_post_rate_limit_error(self, mock_... | "e0") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_base.py | test_post_rate_limit_error | self.assertEqual | string_literal | 34 | import base64
import json
import sys
import unittest
from unittest import mock
import requests
from ...authentication.base import AuthenticationBase
from ...exceptions import Auth0Error, RateLimitError
class TestBase(unittest.TestCase):
@mock.patch("requests.post")
def test_post_rate_limit_error(self, mock_... | "desc") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_logs.py | test_search | self.assertEqual | string_literal | 22 | import unittest
from unittest import mock
from ...management.logs import Logs
class TestLogs(unittest.TestCase):
@mock.patch("auth0.management.logs.RestClient")
def test_search(self, mock_rc):
mock_instance = mock_rc.return_value
logs = Logs(domain="domain", token="jwttoken")
logs.se... | "true") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_token_verifier.py | test_symmetric_verifier_uses_hs256_alg | self.assertEqual | string_literal | 52 | import json
import time
import unittest
from unittest.mock import MagicMock, patch
import jwt
from ...authentication.token_verifier import (
AsymmetricSignatureVerifier,
JwksFetcher,
SignatureVerifier,
SymmetricSignatureVerifier,
TokenVerifier,
)
from ...exceptions import TokenValidationError
RSA... | "HS256") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_token_verifier.py | test_asymmetric_verifier_uses_rs256_alg | self.assertEqual | string_literal | 52 | import json
import time
import unittest
from unittest.mock import MagicMock, patch
import jwt
from ...authentication.token_verifier import (
AsymmetricSignatureVerifier,
JwksFetcher,
SignatureVerifier,
SymmetricSignatureVerifier,
TokenVerifier,
)
from ...exceptions import TokenValidationError
RSA... | "RS256") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test_async/test_async_token_verifier.py | test_RS256_token_signature_passes | self.assertEqual | string_literal | 83 | import time
import unittest
from unittest.mock import ANY
import jwt
from aioresponses import aioresponses
from callee import Attrs
from cryptography.hazmat.primitives import serialization
from .. import TokenValidationError
from ..authentication.async_token_verifier import (
AsyncAsymmetricSignatureVerifier,
... | "auth0|123456789") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test_async/test_async_token_verifier.py | test_RS256_token_signature_fails | self.assertEqual | string_literal | 88 | import time
import unittest
from unittest.mock import ANY
import jwt
from aioresponses import aioresponses
from callee import Attrs
from cryptography.hazmat.primitives import serialization
from .. import TokenValidationError
from ..authentication.async_token_verifier import (
AsyncAsymmetricSignatureVerifier,
... | "Invalid token signature.") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_grants.py | test_get_all | assert_* | string_literal | 20 | import unittest
from unittest import mock
from ...management.grants import Grants
class TestGrants(unittest.TestCase):
@mock.patch("auth0.management.grants.RestClient")
def test_get_all(self, mock_rc):
mock_instance = mock_rc.return_value
g = Grants(domain="domain", token="jwttoken")
... | "https://domain/api/v2/grants") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_clients.py | test_create | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.clients import Clients
class TestClients(unittest.TestCase):
@mock.patch("auth0.management.clients.RestClient")
def test_create(self, mock_rc):
mock_instance = mock_rc.return_value
c = Clients(domain="domain", token="jwttoken")
... | "https://domain/api/v2/clients") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_branding.py | test_get | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.branding import Branding
class TestBranding(unittest.TestCase):
@mock.patch("auth0.management.branding.RestClient")
def test_get(self, mock_rc):
api = mock_rc.return_value
branding = Branding(domain="domain", token="jwttoken")
... | "https://domain/api/v2/branding") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_delegated.py | test_get_token_id_token | self.assertEqual | string_literal | 22 | import unittest
from unittest import mock
from ...authentication.delegated import Delegated
class TestDelegated(unittest.TestCase):
@mock.patch("auth0.authentication.delegated.Delegated.post")
def test_get_token_id_token(self, mock_post):
d = Delegated("my.domain.com", "cid")
d.get_token(
... | "https://my.domain.com/delegation") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_jobs.py | test_get | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.jobs import Jobs
class TestJobs(unittest.TestCase):
@mock.patch("auth0.management.jobs.RestClient")
def test_get(self, mock_rc):
mock_instance = mock_rc.return_value
j = Jobs(domain="domain", token="jwttoken")
j.get("an-id"... | "https://domain/api/v2/jobs/an-id") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_get_token.py | test_authorization_code | self.assertEqual | string_literal | 34 | import unittest
from unittest import mock
from callee.strings import Glob
from cryptography.hazmat.primitives import asymmetric, serialization
from ...authentication.get_token import GetToken
def get_private_key():
private_key = asymmetric.rsa.generate_private_key(
public_exponent=65537,
key_size... | "https://my.domain.com/oauth/token") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_connections.py | test_create | assert_* | string_literal | 17 | import unittest
from unittest import mock
from ...management.connections import Connections
class TestConnection(unittest.TestCase):
@mock.patch("auth0.management.connections.RestClient")
def test_create(self, mock_rc):
mock_instance = mock_rc.return_value
mock_instance.post.return_value = {}... | "https://domain/api/v2/connections") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_logs.py | test_get | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.logs import Logs
class TestLogs(unittest.TestCase):
@mock.patch("auth0.management.logs.RestClient")
def test_get(self, mock_rc):
mock_instance = mock_rc.return_value
logs = Logs(domain="domain", token="jwttoken")
logs.get("... | "https://domain/api/v2/logs/get_id") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_rules.py | test_delete | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.rules import Rules
class TestRules(unittest.TestCase):
@mock.patch("auth0.management.rules.RestClient")
def test_delete(self, mock_rc):
mock_instance = mock_rc.return_value
c = Rules(domain="domain", token="jwttoken")
c.del... | "https://domain/api/v2/rules/an-id") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_stats.py | test_daily_stats | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.stats import Stats
class TestStats(unittest.TestCase):
@mock.patch("auth0.management.stats.RestClient")
def test_daily_stats(self, mock_rc):
mock_instance = mock_rc.return_value
s = Stats(domain="domain", token="jwttoken")
... | "https://domain/api/v2/stats/daily") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_user_blocks.py | test_get_by_identifier | assert_* | string_literal | 17 | import unittest
from unittest import mock
from ...management.user_blocks import UserBlocks
class TestUserBlocks(unittest.TestCase):
@mock.patch("auth0.management.user_blocks.RestClient")
def test_get_by_identifier(self, mock_rc):
mock_instance = mock_rc.return_value
u = UserBlocks(domain="do... | "https://domain/api/v2/user-blocks") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_revoke_token.py | test_revoke_refresh_token | self.assertEqual | string_literal | 17 | import unittest
from unittest import mock
from ...authentication.revoke_token import RevokeToken
class TestRevokeToken(unittest.TestCase):
@mock.patch("auth0.rest.RestClient.post")
def test_revoke_refresh_token(self, mock_post):
a = RevokeToken("my.domain.com", "cid")
# regular apps
a... | "https://my.domain.com/oauth/revoke") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_grants.py | test_delete | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.grants import Grants
class TestGrants(unittest.TestCase):
@mock.patch("auth0.management.grants.RestClient")
def test_delete(self, mock_rc):
mock_instance = mock_rc.return_value
c = Grants(domain="domain", token="jwttoken")
... | "https://domain/api/v2/grants/an-id") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_client_grants.py | test_create | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.client_grants import ClientGrants
class TestClientGrants(unittest.TestCase):
@mock.patch("auth0.management.client_grants.RestClient")
def test_create(self, mock_rc):
mock_instance = mock_rc.return_value
c = ClientGrants(domain="dom... | "https://domain/api/v2/client-grants") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_custom_domains.py | test_get_all | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.custom_domains import CustomDomains
class TestCustomDomains(unittest.TestCase):
@mock.patch("auth0.management.custom_domains.RestClient")
def test_get_all(self, mock_rc):
mock_instance = mock_rc.return_value
g = CustomDomains(domai... | "https://domain/api/v2/custom-domains") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_branding.py | test_create_branding_theme | assert_* | string_literal | 17 | import unittest
from unittest import mock
from ...management.branding import Branding
class TestBranding(unittest.TestCase):
@mock.patch("auth0.management.branding.RestClient")
def test_create_branding_theme(self, mock_rc):
api = mock_rc.return_value
api.post.return_value = {}
brandi... | "https://domain/api/v2/branding/themes") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_clients.py | test_delete | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.clients import Clients
class TestClients(unittest.TestCase):
@mock.patch("auth0.management.clients.RestClient")
def test_delete(self, mock_rc):
mock_instance = mock_rc.return_value
c = Clients(domain="domain", token="jwttoken")
... | "https://domain/api/v2/clients/this-id") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_email_endpoints.py | test_create | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.email_templates import EmailTemplates
class TestClients(unittest.TestCase):
@mock.patch("auth0.management.email_templates.RestClient")
def test_create(self, mock_rc):
mock_instance = mock_rc.return_value
c = EmailTemplates(domain="... | "https://domain/api/v2/email-templates") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_emails.py | test_delete | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.emails import Emails
class TestEmails(unittest.TestCase):
@mock.patch("auth0.management.emails.RestClient")
def test_delete(self, mock_rc):
mock_instance = mock_rc.return_value
e = Emails(domain="domain", token="jwttoken")
... | "https://domain/api/v2/emails/provider") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_guardian.py | test_all_factors | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.guardian import Guardian
class TestGuardian(unittest.TestCase):
@mock.patch("auth0.management.guardian.RestClient")
def test_all_factors(self, mock_rc):
mock_instance = mock_rc.return_value
g = Guardian(domain="domain", token="jwtt... | "https://domain/api/v2/guardian/factors") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_resource_servers.py | test_create | assert_* | string_literal | 17 | import unittest
from unittest import mock
from ...management.resource_servers import ResourceServers
class TestResourceServers(unittest.TestCase):
@mock.patch("auth0.management.resource_servers.RestClient")
def test_create(self, mock_rc):
mock_instance = mock_rc.return_value
r = ResourceServ... | "https://domain/api/v2/resource-servers") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_tenants.py | test_update | assert_* | string_literal | 17 | import unittest
from unittest import mock
from ...management.tenants import Tenants
class TestTenants(unittest.TestCase):
@mock.patch("auth0.management.tenants.RestClient")
def test_update(self, mock_rc):
mock_instance = mock_rc.return_value
mock_instance.patch.return_value = {}
t = ... | "https://domain/api/v2/tenants/settings") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_blacklists.py | test_get | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.blacklists import Blacklists
class TestBlacklists(unittest.TestCase):
@mock.patch("auth0.management.blacklists.RestClient")
def test_get(self, mock_rc):
mock_instance = mock_rc.return_value
t = Blacklists(domain="domain", token="jw... | "https://domain/api/v2/blacklists/tokens") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_jobs.py | test_get_failed_job | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.jobs import Jobs
class TestJobs(unittest.TestCase):
@mock.patch("auth0.management.jobs.RestClient")
def test_get_failed_job(self, mock_rc):
mock_instance = mock_rc.return_value
j = Jobs(domain="domain", token="jwttoken")
j.... | "https://domain/api/v2/jobs/an-id/errors") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_log_streams.py | test_delete | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.log_streams import LogStreams
class TestLogStreams(unittest.TestCase):
@mock.patch("auth0.management.log_streams.RestClient")
def test_delete(self, mock_rc):
mock_instance = mock_rc.return_value
c = LogStreams(domain="domain", toke... | "https://domain/api/v2/log-streams/an-id") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_passwordless.py | test_send_email | self.assertEqual | string_literal | 16 | import unittest
from unittest import mock
from ...authentication.passwordless import Passwordless
class TestPasswordless(unittest.TestCase):
@mock.patch("auth0.rest.RestClient.post")
def test_send_email(self, mock_post):
p = Passwordless("my.domain.com", "cid")
p.email(email="a@b.com", send="... | "https://my.domain.com/passwordless/start") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_jobs.py | test_export_users | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.jobs import Jobs
class TestJobs(unittest.TestCase):
@mock.patch("auth0.management.jobs.RestClient")
def test_export_users(self, mock_rc):
mock_instance = mock_rc.return_value
j = Jobs(domain="domain", token="jwttoken")
j.ex... | "https://domain/api/v2/jobs/users-exports") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_jobs.py | test_import_users | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.jobs import Jobs
class TestJobs(unittest.TestCase):
@mock.patch("auth0.management.jobs.RestClient")
def test_import_users(self, mock_rc):
mock_instance = mock_rc.return_value
j = Jobs(domain="domain", token="jwttoken")
j.im... | "https://domain/api/v2/jobs/users-imports") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_stats.py | test_active_users | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.stats import Stats
class TestStats(unittest.TestCase):
@mock.patch("auth0.management.stats.RestClient")
def test_active_users(self, mock_rc):
mock_instance = mock_rc.return_value
s = Stats(domain="domain", token="jwttoken")
... | "https://domain/api/v2/stats/active-users") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_connections.py | test_delete | assert_* | string_literal | 17 | import unittest
from unittest import mock
from ...management.connections import Connections
class TestConnection(unittest.TestCase):
@mock.patch("auth0.management.connections.RestClient")
def test_delete(self, mock_rc):
mock_instance = mock_rc.return_value
mock_instance.delete.return_value = ... | "https://domain/api/v2/connections/this-id") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_connections.py | test_update | assert_* | string_literal | 17 | import unittest
from unittest import mock
from ...management.connections import Connections
class TestConnection(unittest.TestCase):
@mock.patch("auth0.management.connections.RestClient")
def test_update(self, mock_rc):
mock_instance = mock_rc.return_value
mock_instance.patch.return_value = {... | "https://domain/api/v2/connections/that-id") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_rules_configs.py | test_unset | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.rules_configs import RulesConfigs
class TestRulesConfigs(unittest.TestCase):
@mock.patch("auth0.management.rules_configs.RestClient")
def test_unset(self, mock_rc):
mock_instance = mock_rc.return_value
c = RulesConfigs(domain="doma... | "https://domain/api/v2/rules-configs/an-id") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_database.py | test_signup | self.assertEqual | string_literal | 17 | import unittest
from unittest import mock
from ...authentication.database import Database
class TestDatabase(unittest.TestCase):
@mock.patch("auth0.rest.RestClient.post")
def test_signup(self, mock_post):
d = Database("my.domain.com", "cid")
# using only email and password
d.signup(em... | "https://my.domain.com/dbconnections/signup") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_custom_domains.py | test_get_domain_by_id | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.custom_domains import CustomDomains
class TestCustomDomains(unittest.TestCase):
@mock.patch("auth0.management.custom_domains.RestClient")
def test_get_domain_by_id(self, mock_rc):
mock_instance = mock_rc.return_value
g = CustomDoma... | "https://domain/api/v2/custom-domains/an-id") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_client_grants.py | test_delete | assert_* | string_literal | 16 | import unittest
from unittest import mock
from ...management.client_grants import ClientGrants
class TestClientGrants(unittest.TestCase):
@mock.patch("auth0.management.client_grants.RestClient")
def test_delete(self, mock_rc):
mock_instance = mock_rc.return_value
c = ClientGrants(domain="dom... | "https://domain/api/v2/client-grants/this-id") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_connections.py | test_delete_user_by_email | assert_* | string_literal | 17 | import unittest
from unittest import mock
from ...management.connections import Connections
class TestConnection(unittest.TestCase):
@mock.patch("auth0.management.connections.RestClient")
def test_delete_user_by_email(self, mock_rc):
mock_instance = mock_rc.return_value
mock_instance.delete_u... | "https://domain/api/v2/connections/123/users") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_branding.py | test_get_default_branding_theme | assert_* | string_literal | 17 | import unittest
from unittest import mock
from ...management.branding import Branding
class TestBranding(unittest.TestCase):
@mock.patch("auth0.management.branding.RestClient")
def test_get_default_branding_theme(self, mock_rc):
api = mock_rc.return_value
api.get.return_value = {}
br... | "https://domain/api/v2/branding/themes/default") | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test_async/test_asyncify.py | test_timeout | assert_* | variable | 63 | import base64
import json
import platform
import re
import sys
import unittest
from tempfile import TemporaryFile
from unittest.mock import ANY, MagicMock
import aiohttp
from aioresponses import CallbackResult, aioresponses
from callee import Attrs
from auth0.asyncify import asyncify
from auth0.authentication import ... | ANY) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_auth0.py | test_jobs | self.assertIsInstance | variable | 43 | import unittest
from ...management.actions import Actions
from ...management.attack_protection import AttackProtection
from ...management.auth0 import Auth0
from ...management.blacklists import Blacklists
from ...management.client_credentials import ClientCredentials
from ...management.client_grants import ClientGrant... | Jobs) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_auth0.py | test_logs | self.assertIsInstance | variable | 43 | import unittest
from ...management.actions import Actions
from ...management.attack_protection import AttackProtection
from ...management.auth0 import Auth0
from ...management.blacklists import Blacklists
from ...management.client_credentials import ClientCredentials
from ...management.client_grants import ClientGrant... | Logs) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_auth0.py | test_hooks | self.assertIsInstance | variable | 43 | import unittest
from ...management.actions import Actions
from ...management.attack_protection import AttackProtection
from ...management.auth0 import Auth0
from ...management.blacklists import Blacklists
from ...management.client_credentials import ClientCredentials
from ...management.client_grants import ClientGrant... | Hooks) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_auth0.py | test_roles | self.assertIsInstance | variable | 43 | import unittest
from ...management.actions import Actions
from ...management.attack_protection import AttackProtection
from ...management.auth0 import Auth0
from ...management.blacklists import Blacklists
from ...management.client_credentials import ClientCredentials
from ...management.client_grants import ClientGrant... | Roles) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_auth0.py | test_rules | self.assertIsInstance | variable | 43 | import unittest
from ...management.actions import Actions
from ...management.attack_protection import AttackProtection
from ...management.auth0 import Auth0
from ...management.blacklists import Blacklists
from ...management.client_credentials import ClientCredentials
from ...management.client_grants import ClientGrant... | Rules) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_auth0.py | test_stats | self.assertIsInstance | variable | 43 | import unittest
from ...management.actions import Actions
from ...management.attack_protection import AttackProtection
from ...management.auth0 import Auth0
from ...management.blacklists import Blacklists
from ...management.client_credentials import ClientCredentials
from ...management.client_grants import ClientGrant... | Stats) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_auth0.py | test_users | self.assertIsInstance | variable | 43 | import unittest
from ...management.actions import Actions
from ...management.attack_protection import AttackProtection
from ...management.auth0 import Auth0
from ...management.blacklists import Blacklists
from ...management.client_credentials import ClientCredentials
from ...management.client_grants import ClientGrant... | Users) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_auth0.py | test_emails | self.assertIsInstance | variable | 43 | import unittest
from ...management.actions import Actions
from ...management.attack_protection import AttackProtection
from ...management.auth0 import Auth0
from ...management.blacklists import Blacklists
from ...management.client_credentials import ClientCredentials
from ...management.client_grants import ClientGrant... | Emails) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_auth0.py | test_grants | self.assertIsInstance | variable | 43 | import unittest
from ...management.actions import Actions
from ...management.attack_protection import AttackProtection
from ...management.auth0 import Auth0
from ...management.blacklists import Blacklists
from ...management.client_credentials import ClientCredentials
from ...management.client_grants import ClientGrant... | Grants) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_hooks.py | test_get_secrets | self.assertNotIn | variable | 19 | import unittest
from unittest import mock
from ...management.hooks import Hooks
class TestRules(unittest.TestCase):
@mock.patch("auth0.management.hooks.RestClient")
def test_get_secrets(self, mock_rc):
mock_instance = mock_rc.return_value
c = Hooks(domain="domain", token="jwttoken")
... | kwargs) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_base.py | test_post_includes_telemetry | self.assertIn | variable | 31 | import base64
import json
import sys
import unittest
from unittest import mock
import requests
from ...authentication.base import AuthenticationBase
from ...exceptions import Auth0Error, RateLimitError
class TestBase(unittest.TestCase):
@mock.patch("requests.post")
def test_post_includes_telemetry(self, moc... | headers) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_auth0.py | test_actions | self.assertIsInstance | variable | 43 | import unittest
from ...management.actions import Actions
from ...management.attack_protection import AttackProtection
from ...management.auth0 import Auth0
from ...management.blacklists import Blacklists
from ...management.client_credentials import ClientCredentials
from ...management.client_grants import ClientGrant... | Actions) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_auth0.py | test_clients | self.assertIsInstance | variable | 43 | import unittest
from ...management.actions import Actions
from ...management.attack_protection import AttackProtection
from ...management.auth0 import Auth0
from ...management.blacklists import Blacklists
from ...management.client_credentials import ClientCredentials
from ...management.client_grants import ClientGrant... | Clients) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_auth0.py | test_prompts | self.assertIsInstance | variable | 43 | import unittest
from ...management.actions import Actions
from ...management.attack_protection import AttackProtection
from ...management.auth0 import Auth0
from ...management.blacklists import Blacklists
from ...management.client_credentials import ClientCredentials
from ...management.client_grants import ClientGrant... | Prompts) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_auth0.py | test_tenants | self.assertIsInstance | variable | 43 | import unittest
from ...management.actions import Actions
from ...management.attack_protection import AttackProtection
from ...management.auth0 import Auth0
from ...management.blacklists import Blacklists
from ...management.client_credentials import ClientCredentials
from ...management.client_grants import ClientGrant... | Tenants) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_auth0.py | test_tickets | self.assertIsInstance | variable | 43 | import unittest
from ...management.actions import Actions
from ...management.attack_protection import AttackProtection
from ...management.auth0 import Auth0
from ...management.blacklists import Blacklists
from ...management.client_credentials import ClientCredentials
from ...management.client_grants import ClientGrant... | Tickets) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test_async/test_async_auth0.py | test_get | self.assertEqual | variable | 29 | import re
import unittest
from unittest.mock import ANY, MagicMock
from aioresponses import CallbackResult, aioresponses
from callee import Attrs
from auth0.management.async_auth0 import AsyncAuth0 as Auth0
clients = re.compile(r"^https://example\.com/api/v2/clients.*")
factors = re.compile(r"^https://example\.com/a... | payload) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test_async/test_asyncify.py | test_get | self.assertEqual | variable | 61 | import base64
import json
import platform
import re
import sys
import unittest
from tempfile import TemporaryFile
from unittest.mock import ANY, MagicMock
import aiohttp
from aioresponses import CallbackResult, aioresponses
from callee import Attrs
from auth0.asyncify import asyncify
from auth0.authentication import ... | payload) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_token_verifier.py | test_get_jwks_json_twice_on_cache_expired | assert_* | variable | 72 | import json
import time
import unittest
from unittest.mock import MagicMock, patch
import jwt
from ...authentication.token_verifier import (
AsymmetricSignatureVerifier,
JwksFetcher,
SignatureVerifier,
SymmetricSignatureVerifier,
TokenVerifier,
)
from ...exceptions import TokenValidationError
RSA... | JWKS_URL) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_token_verifier.py | test_succeeds_when_org_name_specified_matches | self.assertIn | variable | 95 | import json
import time
import unittest
from unittest.mock import MagicMock, patch
import jwt
from ...authentication.token_verifier import (
AsymmetricSignatureVerifier,
JwksFetcher,
SignatureVerifier,
SymmetricSignatureVerifier,
TokenVerifier,
)
from ...exceptions import TokenValidationError
RSA... | response) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_auth0.py | test_guardian | self.assertIsInstance | variable | 43 | import unittest
from ...management.actions import Actions
from ...management.attack_protection import AttackProtection
from ...management.auth0 import Auth0
from ...management.blacklists import Blacklists
from ...management.client_credentials import ClientCredentials
from ...management.client_grants import ClientGrant... | Guardian) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test_async/test_async_token_verifier.py | test_async_fetches_jwks_json_once_on_cache_miss | self.assertRaises | variable | 65 | import time
import unittest
from unittest.mock import ANY
import jwt
from aioresponses import aioresponses
from callee import Attrs
from cryptography.hazmat.primitives import serialization
from .. import TokenValidationError
from ..authentication.async_token_verifier import (
AsyncAsymmetricSignatureVerifier,
... | Exception) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/authentication/test_delegated.py | test_get_token_value_error | self.assertRaises | variable | 13 | import unittest
from unittest import mock
from ...authentication.delegated import Delegated
class TestDelegated(unittest.TestCase):
@mock.patch("auth0.authentication.delegated.Delegated.post")
def test_get_token_value_error(self, mock_post):
d = Delegated("my.domain.com", "cid")
with self.a... | ValueError) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_actions.py | test_get_action | self.assertEqual | collection | 19 | import unittest
from unittest import mock
from ...management.actions import Actions
class TestActions(unittest.TestCase):
@mock.patch("auth0.management.actions.RestClient")
def test_get_action(self, mock_rc):
mock_instance = mock_rc.return_value
c = Actions(domain="domain", token="jwttoken")... | {}) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_organizations.py | test_get_organization_by_name | self.assertEqual | collection | 19 | import unittest
from unittest import mock
from ...management.organizations import Organizations
class TestOrganizations(unittest.TestCase):
@mock.patch("auth0.management.organizations.RestClient")
def test_get_organization_by_name(self, mock_rc):
mock_instance = mock_rc.return_value
c = Orga... | {}) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_actions.py | test_init_with_optionals | self.assertEqual | collection | 10 | import unittest
from unittest import mock
from ...management.actions import Actions
class TestActions(unittest.TestCase):
def test_init_with_optionals(self):
t = Actions(domain="domain", token="jwttoken", telemetry=False, timeout=(10, 2))
self.assertEqual(t.client.options.timeout, | (10, 2)) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_atack_protection.py | test_init_with_optionals | self.assertEqual | collection | 12 | import unittest
from unittest import mock
from ...management.attack_protection import AttackProtection
class TestAttackProtection(unittest.TestCase):
def test_init_with_optionals(self):
t = AttackProtection(
domain="domain", token="jwttoken", telemetry=False, timeout=(10, 2)
)
... | (10, 2)) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
auth0/auth0-python | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | train | train | auth0/test/management/test_blacklists.py | test_init_with_optionals | self.assertEqual | collection | 12 | import unittest
from unittest import mock
from ...management.blacklists import Blacklists
class TestBlacklists(unittest.TestCase):
def test_init_with_optionals(self):
t = Blacklists(
domain="domain", token="jwttoken", telemetry=False, timeout=(10, 2)
)
self.assertEqual(t.clien... | (10, 2)) | e7d5f1c2a160ea3f2cea7cc49bdbac5608b8bb9e | 125 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.