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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_settings_openapi_fields.py | test_info | assert | complex_expr | 22 | from openapi_spec_validator import validate_spec
def test_info(app, client):
app.config['INFO'] = {
'description': 'My API',
'termsOfService': 'http://example.com',
'contact': {
'name': 'API Support',
'url': 'http://www.example.com/support',
'email': 'sup... | app.config['INFO']['description'] | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_settings_openapi_fields.py | test_info | assert | complex_expr | 23 | from openapi_spec_validator import validate_spec
def test_info(app, client):
app.config['INFO'] = {
'description': 'My API',
'termsOfService': 'http://example.com',
'contact': {
'name': 'API Support',
'url': 'http://www.example.com/support',
'email': 'sup... | app.config['INFO']['termsOfService'] | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_decorator_auth_required.py | test_lowercase_token_scheme_value | assert | complex_expr | 22 | from flask.views import MethodView
from openapi_spec_validator import validate_spec
from apiflask import APIBlueprint
from apiflask.security import HTTPBasicAuth
from apiflask.security import HTTPTokenAuth
def test_lowercase_token_scheme_value(app, client):
auth = HTTPTokenAuth(scheme='bearer')
@app.route('... | rv.json['components']['securitySchemes'] | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_openapi_security.py | test_httpbasicauth_security_scheme | assert | complex_expr | 19 | import pytest
from openapi_spec_validator import validate_spec
from apiflask import HTTPBasicAuth
from apiflask import HTTPTokenAuth
def test_httpbasicauth_security_scheme(app, client):
auth = HTTPBasicAuth()
@app.get('/')
@app.auth_required(auth)
def foo():
pass
rv = client.get('/openap... | rv.json['components']['securitySchemes'] | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_decorator_auth_required.py | test_lowercase_token_scheme_value | assert | complex_expr | 23 | from flask.views import MethodView
from openapi_spec_validator import validate_spec
from apiflask import APIBlueprint
from apiflask.security import HTTPBasicAuth
from apiflask.security import HTTPTokenAuth
def test_lowercase_token_scheme_value(app, client):
auth = HTTPTokenAuth(scheme='bearer')
@app.route('... | rv.json['paths']['/']['get']['security'][0] | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_settings_openapi_fields.py | test_security_shemes | assert | complex_expr | 23 | from openapi_spec_validator import validate_spec
def test_security_shemes(app, client):
app.config['SECURITY_SCHEMES'] = {
'ApiKeyAuth': {
'type': 'apiKey',
'in': 'header',
'name': 'X-API-Key'
},
'BasicAuth': {
'type': 'http',
'sch... | app.config['SECURITY_SCHEMES']['BasicAuth'] | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_settings_openapi_fields.py | test_security_shemes | assert | complex_expr | 21 | from openapi_spec_validator import validate_spec
def test_security_shemes(app, client):
app.config['SECURITY_SCHEMES'] = {
'ApiKeyAuth': {
'type': 'apiKey',
'in': 'header',
'name': 'X-API-Key'
},
'BasicAuth': {
'type': 'http',
'sch... | app.config['SECURITY_SCHEMES']['ApiKeyAuth'] | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_openapi_security.py | test_custom_security_scheme_name | assert | complex_expr | 37 | import pytest
from openapi_spec_validator import validate_spec
from apiflask import HTTPBasicAuth
from apiflask import HTTPTokenAuth
def test_custom_security_scheme_name(app, client):
basic_auth = HTTPBasicAuth(security_scheme_name='basic_auth')
token_auth = HTTPTokenAuth(header='X-API-Key', security_scheme_n... | rv.json['paths']['/foo']['get']['security'][0] | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_openapi_security.py | test_custom_security_scheme_name | assert | complex_expr | 38 | import pytest
from openapi_spec_validator import validate_spec
from apiflask import HTTPBasicAuth
from apiflask import HTTPTokenAuth
def test_custom_security_scheme_name(app, client):
basic_auth = HTTPBasicAuth(security_scheme_name='basic_auth')
token_auth = HTTPTokenAuth(header='X-API-Key', security_scheme_n... | rv.json['paths']['/bar']['get']['security'][0] | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_base_response.py | test_base_response_204 | assert | complex_expr | 22 | import pytest
from openapi_spec_validator import validate_spec
from .schemas import Foo
from apiflask import Schema
from apiflask.fields import Field
from apiflask.fields import Integer
from apiflask.fields import String
def test_base_response_204(app, client):
app.config['BASE_RESPONSE_SCHEMA'] = BaseResponse
... | rv.json['paths']['/']['get']['responses']['204'] | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_schemas.py | test_empty_schema | assert | complex_expr | 23 | import pytest
from openapi_spec_validator import validate_spec
from apiflask.schemas import EmptySchema
from apiflask.schemas import FileSchema
@pytest.mark.parametrize('schema', [{}, EmptySchema])
def test_empty_schema(app, client, schema):
@app.route('/foo')
@app.output(schema, status_code=204)
def empt... | rv.json['paths']['/foo']['get']['responses']['204'] | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_schemas.py | test_empty_schema | assert | complex_expr | 25 | import pytest
from openapi_spec_validator import validate_spec
from apiflask.schemas import EmptySchema
from apiflask.schemas import FileSchema
@pytest.mark.parametrize('schema', [{}, EmptySchema])
def test_empty_schema(app, client, schema):
@app.route('/foo')
@app.output(schema, status_code=204)
def empt... | rv.json['paths']['/bar']['get']['responses']['200'] | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_base_response.py | test_base_response_spec | assert | func_call | 34 | import pytest
from openapi_spec_validator import validate_spec
from .schemas import Foo
from apiflask import Schema
from apiflask.fields import Field
from apiflask.fields import Integer
from apiflask.fields import String
@pytest.mark.parametrize(
'base_schema',
[
BaseResponse,
base_response_sc... | str(e.value) | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_blueprint.py | test_blueprint_object | assert | none_literal | 13 | from flask.views import MethodView
from openapi_spec_validator import validate_spec
from apiflask import APIBlueprint
from apiflask.security import HTTPBasicAuth
from apiflask.security import HTTPTokenAuth
def test_blueprint_object():
bp = APIBlueprint('test', __name__)
assert bp.name == 'test'
assert has... | None | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_openapi_basic.py | test_servers_and_externaldocs | assert | none_literal | 17 | import json
import pytest
from flask import request
from openapi_spec_validator import validate_spec
from .schemas import Bar
from .schemas import Baz
from .schemas import Foo
from apiflask import APIBlueprint
from apiflask import Schema
from apiflask.commands import spec_command
from apiflask.fields import Integer
... | None | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_openapi_blueprint.py | test_spec_path | assert | none_literal | 10 | import pytest
from apiflask import APIFlask
def test_spec_path(app):
assert app.spec_path
app = APIFlask(__name__, spec_path=None)
assert app.spec_path is | None | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_openapi_info.py | test_other_info_fields | assert | none_literal | 7 | from openapi_spec_validator import validate_spec
from apiflask import APIFlask
def test_other_info_fields(app, client):
assert app.description is | None | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_openapi_paths.py | test_register_validation_error_response | assert | none_literal | 25 | from openapi_spec_validator import validate_spec
from .schemas import Foo
from .schemas import Header
from .schemas import Pagination
from .schemas import Query
def test_register_validation_error_response(app, client):
error_code = str(app.config['VALIDATION_ERROR_STATUS_CODE'])
@app.post('/foo')
@app.in... | None | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_openapi_tags.py | test_tags | assert | none_literal | 8 | import pytest
from openapi_spec_validator import validate_spec
from apiflask import APIBlueprint
def test_tags(app, client):
assert app.tags is | None | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_settings_response_customization.py | test_validation_error_status_code_and_description | assert | none_literal | 24 | import pytest
from openapi_spec_validator import validate_spec
from .schemas import Foo
from .schemas import HTTPError
from .schemas import ValidationError
from apiflask.schemas import EmptySchema
from apiflask.schemas import http_error_schema
from apiflask.security import HTTPBasicAuth
def test_validation_error_stat... | None | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apiflask/apiflask | d4070ebed440918b8e2389601ab2417958129cee | 138 | train | train | tests/test_openapi_blueprint.py | test_disable_openapi_with_enable_openapi_arg | assert | bool_literal | 10 | import pytest
from apiflask import APIFlask
def test_disable_openapi_with_enable_openapi_arg(app):
assert app.enable_openapi
app = APIFlask(__name__, enable_openapi=False)
assert app.enable_openapi is | False | d4070ebed440918b8e2389601ab2417958129cee | 138 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/serializers/test_register.py | test_simple_email_based_user_generated_fields | assert | collection | 16 | import pytest
from rest_registration.settings import registration_settings
def serializer():
serializer_class = registration_settings.REGISTER_SERIALIZER_CLASS
return serializer_class(data={})
def test_simple_email_based_user_generated_fields(
settings_with_register_verification,
settings_wit... | {'id', 'email', 'password', 'password_confirm'} | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/serializers/test_register.py | test_no_password_generated_fields | assert | collection | 15 | import pytest
from rest_registration.settings import registration_settings
def serializer():
serializer_class = registration_settings.REGISTER_SERIALIZER_CLASS
return serializer_class(data={})
def test_no_password_generated_fields(
settings_with_register_verification,
settings_with_register_n... | { 'id', 'username', 'first_name', 'last_name', 'email', 'password', } | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/serializers/test_register.py | test_generated_fields | assert | collection | 12 | import pytest
from rest_registration.settings import registration_settings
def serializer():
serializer_class = registration_settings.REGISTER_SERIALIZER_CLASS
return serializer_class(data={})
def test_generated_fields(settings_with_register_verification, serializer):
field_names = set(serializer.get_fie... | { 'id', 'username', 'first_name', 'last_name', 'email', 'password', 'password_confirm', } | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/base.py | assert_response | assert_* | numeric_literal | 51 | from urllib.parse import parse_qs, urlparse
from django.contrib.sessions.middleware import SessionMiddleware
from django.urls import resolve
from rest_framework import status
from rest_framework.test import APIRequestFactory
from tests.helpers.testcases import BaseViewTestCase
class APIViewTestCase(BaseViewTestCase)... | 400) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/base.py | assert_valid_response | assert_* | variable | 56 | from urllib.parse import parse_qs, urlparse
from django.contrib.sessions.middleware import SessionMiddleware
from django.urls import resolve
from rest_framework import status
from rest_framework.test import APIRequestFactory
from tests.helpers.testcases import BaseViewTestCase
class APIViewTestCase(BaseViewTestCase)... | response) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/base.py | assert_valid_verification_url | self.assertEqual | variable | 95 | from urllib.parse import parse_qs, urlparse
from django.contrib.sessions.middleware import SessionMiddleware
from django.urls import resolve
from rest_framework import status
from rest_framework.test import APIRequestFactory
from tests.helpers.testcases import BaseViewTestCase
class APIViewTestCase(BaseViewTestCase)... | expected_path) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/base.py | assert_response | self.assertEqual | variable | 49 | from urllib.parse import parse_qs, urlparse
from django.contrib.sessions.middleware import SessionMiddleware
from django.urls import resolve
from rest_framework import status
from rest_framework.test import APIRequestFactory
from tests.helpers.testcases import BaseViewTestCase
class APIViewTestCase(BaseViewTestCase)... | expected_status_code) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/base.py | assert_valid_verification_url | self.assertSetEqual | func_call | 97 | from urllib.parse import parse_qs, urlparse
from django.contrib.sessions.middleware import SessionMiddleware
from django.urls import resolve
from rest_framework import status
from rest_framework.test import APIRequestFactory
from tests.helpers.testcases import BaseViewTestCase
class APIViewTestCase(BaseViewTestCase)... | set(expected_fields)) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/login/test_login.py | test_invalid_non_field_errors | assert_* | variable | 32 | import pytest
from django.test.utils import override_settings
from rest_framework import status
from rest_framework.authtoken.models import Token
from tests.helpers.api_views import (
assert_response_is_bad_request,
assert_response_is_ok
)
from tests.helpers.settings import override_rest_registration_settings
... | response) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/login/test_login.py | test_success_with_token | self.assertEqual | complex_expr | 40 | import pytest
from django.test.utils import override_settings
from rest_framework import status
from rest_framework.authtoken.models import Token
from tests.helpers.api_views import (
assert_response_is_bad_request,
assert_response_is_ok
)
from tests.helpers.settings import override_rest_registration_settings
... | self.user) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/login/test_login.py | test_invalid_non_field_errors | assert | complex_expr | 31 | import pytest
from django.test.utils import override_settings
from rest_framework import status
from rest_framework.authtoken.models import Token
from tests.helpers.api_views import (
assert_response_is_bad_request,
assert_response_is_ok
)
from tests.helpers.settings import override_rest_registration_settings
... | response.data | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/login/test_login.py | test_success_with_token | self.assertIn | complex_expr | 37 | import pytest
from django.test.utils import override_settings
from rest_framework import status
from rest_framework.authtoken.models import Token
from tests.helpers.api_views import (
assert_response_is_bad_request,
assert_response_is_ok
)
from tests.helpers.settings import override_rest_registration_settings
... | response.data) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/login/test_login.py | test_success | assert_* | complex_expr | 31 | import pytest
from django.test.utils import override_settings
from rest_framework import status
from rest_framework.authtoken.models import Token
from tests.helpers.api_views import (
assert_response_is_bad_request,
assert_response_is_ok
)
from tests.helpers.settings import override_rest_registration_settings
... | status.HTTP_200_OK) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/login/test_login.py | test_invalid | assert_* | complex_expr | 31 | import pytest
from django.test.utils import override_settings
from rest_framework import status
from rest_framework.authtoken.models import Token
from tests.helpers.api_views import (
assert_response_is_bad_request,
assert_response_is_ok
)
from tests.helpers.settings import override_rest_registration_settings
... | status.HTTP_400_BAD_REQUEST) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/login/test_logout.py | test_when_faulty_auth_token_manager_then_logout_fails | assert_* | variable | 31 | import pytest
from django.test.utils import modify_settings, override_settings
from rest_framework import status
from rest_framework.authtoken.models import Token
from rest_framework.test import force_authenticate
from tests.helpers.api_views import assert_response_is_bad_request
from tests.helpers.settings import ove... | response) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/login/test_logout.py | test_success | self.assertEqual | complex_expr | 27 | import pytest
from django.test.utils import modify_settings, override_settings
from rest_framework import status
from rest_framework.authtoken.models import Token
from rest_framework.test import force_authenticate
from tests.helpers.api_views import assert_response_is_bad_request
from tests.helpers.settings import ove... | status.HTTP_200_OK) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/login/test_logout.py | test_not_logged_in | self.assertEqual | complex_expr | 49 | import pytest
from django.test.utils import modify_settings, override_settings
from rest_framework import status
from rest_framework.authtoken.models import Token
from rest_framework.test import force_authenticate
from tests.helpers.api_views import assert_response_is_bad_request
from tests.helpers.settings import ove... | status.HTTP_403_FORBIDDEN) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/login/test_logout.py | _test_revoke_nonexistent_token_failure | self.assertEqual | complex_expr | 43 | import pytest
from django.test.utils import modify_settings, override_settings
from rest_framework import status
from rest_framework.authtoken.models import Token
from rest_framework.test import force_authenticate
from tests.helpers.api_views import assert_response_is_bad_request
from tests.helpers.settings import ove... | status.HTTP_400_BAD_REQUEST) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/login/test_logout.py | test_when_faulty_auth_token_manager_then_logout_fails | assert | string_literal | 32 | import pytest
from django.test.utils import modify_settings, override_settings
from rest_framework import status
from rest_framework.authtoken.models import Token
from rest_framework.test import force_authenticate
from tests.helpers.api_views import assert_response_is_bad_request
from tests.helpers.settings import ove... | 'Authentication token cannot be revoked' | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/login/test_logout.py | _test_revoke_token_success | self.assertFalse | func_call | 32 | import pytest
from django.test.utils import modify_settings, override_settings
from rest_framework import status
from rest_framework.authtoken.models import Token
from rest_framework.test import force_authenticate
from tests.helpers.api_views import assert_response_is_bad_request
from tests.helpers.settings import ove... | Token.objects.filter(user=self.user).exists()) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register/test_register.py | test_when_notification_failure_then_user_not_created | assert_* | numeric_literal | 77 | from urllib.parse import quote_plus as urlquote
from urllib.parse import unquote_plus as urlunquote
from urllib.parse import urlparse
import pytest
from django.contrib.auth import get_user_model
from django.core.mail.backends.base import BaseEmailBackend
from django.test.utils import override_settings
from rest_framew... | 0) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register/test_register.py | assert_valid_register_verification_email | assert_* | variable | 78 | from urllib.parse import quote_plus as urlquote
from urllib.parse import unquote_plus as urlunquote
from urllib.parse import urlparse
import pytest
from django.contrib.auth import get_user_model
from django.core.mail.backends.base import BaseEmailBackend
from django.test.utils import override_settings
from rest_framew... | url) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register/test_register.py | test_ok_when_custom_verification_template_selector | assert_* | variable | 80 | from urllib.parse import quote_plus as urlquote
from urllib.parse import unquote_plus as urlunquote
from urllib.parse import urlparse
import pytest
from django.contrib.auth import get_user_model
from django.core.mail.backends.base import BaseEmailBackend
from django.test.utils import override_settings
from rest_framew... | data) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register/test_register.py | test_ok_when_custom_verification_template_selector | assert_* | variable | 86 | from urllib.parse import quote_plus as urlquote
from urllib.parse import unquote_plus as urlunquote
from urllib.parse import urlparse
import pytest
from django.contrib.auth import get_user_model
from django.core.mail.backends.base import BaseEmailBackend
from django.test.utils import override_settings
from rest_framew... | timer) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register/test_register.py | assert_valid_register_verification_email | assert | complex_expr | 84 | from urllib.parse import quote_plus as urlquote
from urllib.parse import unquote_plus as urlunquote
from urllib.parse import urlparse
import pytest
from django.contrib.auth import get_user_model
from django.core.mail.backends.base import BaseEmailBackend
from django.test.utils import override_settings
from rest_framew... | user.pk | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register/test_register.py | assert_user_state_matches_data | assert | variable | 71 | from urllib.parse import quote_plus as urlquote
from urllib.parse import unquote_plus as urlunquote
from urllib.parse import urlparse
import pytest
from django.contrib.auth import get_user_model
from django.core.mail.backends.base import BaseEmailBackend
from django.test.utils import override_settings
from rest_framew... | verified | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register/test_register.py | test_register_ok | self.assertEqual | variable | 91 | from urllib.parse import quote_plus as urlquote
from urllib.parse import unquote_plus as urlunquote
from urllib.parse import urlparse
import pytest
from django.contrib.auth import get_user_model
from django.core.mail.backends.base import BaseEmailBackend
from django.test.utils import override_settings
from rest_framew... | user_id) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register/test_register.py | test_ok_when_custom_verification_template_selector | assert_* | variable | 78 | from urllib.parse import quote_plus as urlquote
from urllib.parse import unquote_plus as urlunquote
from urllib.parse import urlparse
import pytest
from django.contrib.auth import get_user_model
from django.core.mail.backends.base import BaseEmailBackend
from django.test.utils import override_settings
from rest_framew... | response) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register/test_verify_registration.py | test_verify_ok_login | assert_* | variable | 44 | import time
from unittest import mock
from unittest.mock import patch
from rest_framework import status
from rest_registration.api.views.register import RegisterSigner
from tests.helpers.constants import REGISTER_VERIFICATION_URL, VERIFICATION_FROM_EMAIL
from tests.helpers.settings import override_rest_registration_s... | user) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register/test_verify_registration.py | prepare_user | self.assertFalse | complex_expr | 19 | import time
from unittest import mock
from unittest.mock import patch
from rest_framework import status
from rest_registration.api.views.register import RegisterSigner
from tests.helpers.constants import REGISTER_VERIFICATION_URL, VERIFICATION_FROM_EMAIL
from tests.helpers.settings import override_rest_registration_s... | user.is_active) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register/test_verify_registration.py | test_verify_ok | assert_* | complex_expr | 40 | import time
from unittest import mock
from unittest.mock import patch
from rest_framework import status
from rest_registration.api.views.register import RegisterSigner
from tests.helpers.constants import REGISTER_VERIFICATION_URL, VERIFICATION_FROM_EMAIL
from tests.helpers.settings import override_rest_registration_s... | status.HTTP_200_OK) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register/test_verify_registration.py | test_verify_disabled | assert_* | complex_expr | 45 | import time
from unittest import mock
from unittest.mock import patch
from rest_framework import status
from rest_registration.api.views.register import RegisterSigner
from tests.helpers.constants import REGISTER_VERIFICATION_URL, VERIFICATION_FROM_EMAIL
from tests.helpers.settings import override_rest_registration_s... | status.HTTP_404_NOT_FOUND) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register/test_verify_registration.py | test_verify_one_time_use | assert_* | complex_expr | 48 | import time
from unittest import mock
from unittest.mock import patch
from rest_framework import status
from rest_registration.api.views.register import RegisterSigner
from tests.helpers.constants import REGISTER_VERIFICATION_URL, VERIFICATION_FROM_EMAIL
from tests.helpers.settings import override_rest_registration_s... | status.HTTP_400_BAD_REQUEST) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_register_email.py | assert_valid_verification_email_sent | assert_* | numeric_literal | 80 | from unittest import mock
import pytest
from django.conf import settings
from django.core import signing
from django.test.utils import override_settings
from rest_framework import status
from rest_framework.test import force_authenticate
from rest_registration.api.views.register_email import RegisterEmailSigner
from ... | 1) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_register_email.py | test_no_templates_without_verification_ok | assert_* | numeric_literal | 135 | from unittest import mock
import pytest
from django.conf import settings
from django.core import signing
from django.test.utils import override_settings
from rest_framework import status
from rest_framework.test import force_authenticate
from rest_registration.api.views.register_email import RegisterEmailSigner
from ... | 0) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_register_email.py | assert_valid_register_email_verification_email | assert_* | variable | 52 | from unittest import mock
import pytest
from django.conf import settings
from django.core import signing
from django.test.utils import override_settings
from rest_framework import status
from rest_framework.test import force_authenticate
from rest_registration.api.views.register_email import RegisterEmailSigner
from ... | url) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_register_email.py | test_ok_when_custom_verification_templates_selector | assert_* | variable | 63 | from unittest import mock
import pytest
from django.conf import settings
from django.core import signing
from django.test.utils import override_settings
from rest_framework import status
from rest_framework.test import force_authenticate
from rest_registration.api.views.register_email import RegisterEmailSigner
from ... | timer) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_register_email.py | assert_valid_register_email_verification_email | assert | complex_expr | 60 | from unittest import mock
import pytest
from django.conf import settings
from django.core import signing
from django.test.utils import override_settings
from rest_framework import status
from rest_framework.test import force_authenticate
from rest_registration.api.views.register_email import RegisterEmailSigner
from ... | user.pk | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_register_email.py | test_verify_signer_or_bad_request_non_field_errors | pytest.raises | variable | 58 | from unittest import mock
import pytest
from django.conf import settings
from django.core import signing
from django.test.utils import override_settings
from rest_framework import status
from rest_framework.test import force_authenticate
from rest_registration.api.views.register_email import RegisterEmailSigner
from ... | expected) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_register_email.py | test_register_email_fail_with_non_field_errors | assert_* | variable | 59 | from unittest import mock
import pytest
from django.conf import settings
from django.core import signing
from django.test.utils import override_settings
from rest_framework import status
from rest_framework.test import force_authenticate
from rest_registration.api.views.register_email import RegisterEmailSigner
from ... | response) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_register_email.py | assert_valid_register_email_verification_email | assert | collection | 49 | from unittest import mock
import pytest
from django.conf import settings
from django.core import signing
from django.test.utils import override_settings
from rest_framework import status
from rest_framework.test import force_authenticate
from rest_registration.api.views.register_email import RegisterEmailSigner
from ... | [new_email] | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_register_email.py | assert_user_email_not_changed | self.assertEqual | complex_expr | 77 | from unittest import mock
import pytest
from django.conf import settings
from django.core import signing
from django.test.utils import override_settings
from rest_framework import status
from rest_framework.test import force_authenticate
from rest_registration.api.views.register_email import RegisterEmailSigner
from ... | self.email) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_verify_email.py | test_user_with_unique_email_user_email_already_exists_non_field_errors | assert_* | variable | 73 | import time
from unittest.mock import patch
from django.test.utils import override_settings
from rest_framework import status
from rest_registration.api.views.register_email import RegisterEmailSigner
from tests.helpers.constants import (
REGISTER_EMAIL_VERIFICATION_URL,
VERIFICATION_FROM_EMAIL
)
from tests.h... | response) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_verify_email.py | test_inactive_user | self.assertEqual | variable | 82 | import time
from unittest.mock import patch
from django.test.utils import override_settings
from rest_framework import status
from rest_registration.api.views.register_email import RegisterEmailSigner
from tests.helpers.constants import (
REGISTER_EMAIL_VERIFICATION_URL,
VERIFICATION_FROM_EMAIL
)
from tests.h... | old_email) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_verify_email.py | assert_user_email_not_changed | self.assertEqual | complex_expr | 61 | import time
from unittest.mock import patch
from django.test.utils import override_settings
from rest_framework import status
from rest_registration.api.views.register_email import RegisterEmailSigner
from tests.helpers.constants import (
REGISTER_EMAIL_VERIFICATION_URL,
VERIFICATION_FROM_EMAIL
)
from tests.h... | self.email) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_verify_email.py | test_user_with_unique_email_user_email_already_exists_non_field_errors | assert | complex_expr | 75 | import time
from unittest.mock import patch
from django.test.utils import override_settings
from rest_framework import status
from rest_registration.api.views.register_email import RegisterEmailSigner
from tests.helpers.constants import (
REGISTER_EMAIL_VERIFICATION_URL,
VERIFICATION_FROM_EMAIL
)
from tests.h... | response.data | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_verify_email.py | assert_user_email_changed | self.assertEqual | complex_expr | 57 | import time
from unittest.mock import patch
from django.test.utils import override_settings
from rest_framework import status
from rest_registration.api.views.register_email import RegisterEmailSigner
from tests.helpers.constants import (
REGISTER_EMAIL_VERIFICATION_URL,
VERIFICATION_FROM_EMAIL
)
from tests.h... | self.new_email) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_verify_email.py | test_ok | assert_* | complex_expr | 72 | import time
from unittest.mock import patch
from django.test.utils import override_settings
from rest_framework import status
from rest_registration.api.views.register_email import RegisterEmailSigner
from tests.helpers.constants import (
REGISTER_EMAIL_VERIFICATION_URL,
VERIFICATION_FROM_EMAIL
)
from tests.h... | status.HTTP_200_OK) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_verify_email.py | test_noverify_not_found | assert_* | complex_expr | 75 | import time
from unittest.mock import patch
from django.test.utils import override_settings
from rest_framework import status
from rest_registration.api.views.register_email import RegisterEmailSigner
from tests.helpers.constants import (
REGISTER_EMAIL_VERIFICATION_URL,
VERIFICATION_FROM_EMAIL
)
from tests.h... | status.HTTP_404_NOT_FOUND) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/register_email/test_verify_email.py | test_tampered_timestamp | assert_* | complex_expr | 73 | import time
from unittest.mock import patch
from django.test.utils import override_settings
from rest_framework import status
from rest_registration.api.views.register_email import RegisterEmailSigner
from tests.helpers.constants import (
REGISTER_EMAIL_VERIFICATION_URL,
VERIFICATION_FROM_EMAIL
)
from tests.h... | status.HTTP_400_BAD_REQUEST) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/reset_password/test_reset_password.py | _assert_response_is_bad_password | assert | numeric_literal | 46 | import time
from unittest import skip
from unittest.mock import patch
import pytest
from rest_framework import status
from rest_registration.api.views.reset_password import ResetPasswordSigner
from tests.helpers.api_views import (
assert_response_is_bad_request,
assert_response_is_ok
)
from tests.helpers.cons... | 1 | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/reset_password/test_reset_password.py | _assert_response_is_bad_password | assert_* | variable | 42 | import time
from unittest import skip
from unittest.mock import patch
import pytest
from rest_framework import status
from rest_registration.api.views.reset_password import ResetPasswordSigner
from tests.helpers.api_views import (
assert_response_is_bad_request,
assert_response_is_ok
)
from tests.helpers.cons... | request) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/reset_password/test_reset_password.py | test_when_confirm_enabled_and_password_confirm_field_then_success | assert_* | variable | 53 | import time
from unittest import skip
from unittest.mock import patch
import pytest
from rest_framework import status
from rest_registration.api.views.reset_password import ResetPasswordSigner
from tests.helpers.api_views import (
assert_response_is_bad_request,
assert_response_is_ok
)
from tests.helpers.cons... | response) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/reset_password/test_reset_password.py | _assert_response_is_bad_password | assert | complex_expr | 44 | import time
from unittest import skip
from unittest.mock import patch
import pytest
from rest_framework import status
from rest_registration.api.views.reset_password import ResetPasswordSigner
from tests.helpers.api_views import (
assert_response_is_bad_request,
assert_response_is_ok
)
from tests.helpers.cons... | request.data | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/reset_password/test_reset_password.py | _assert_response_is_bad_password | assert | variable | 48 | import time
from unittest import skip
from unittest.mock import patch
import pytest
from rest_framework import status
from rest_registration.api.views.reset_password import ResetPasswordSigner
from tests.helpers.api_views import (
assert_response_is_bad_request,
assert_response_is_ok
)
from tests.helpers.cons... | expected_error_message | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/reset_password/test_reset_password.py | test_reset_tampered_timestamp | assert_* | complex_expr | 41 | import time
from unittest import skip
from unittest.mock import patch
import pytest
from rest_framework import status
from rest_registration.api.views.reset_password import ResetPasswordSigner
from tests.helpers.api_views import (
assert_response_is_bad_request,
assert_response_is_ok
)
from tests.helpers.cons... | status.HTTP_400_BAD_REQUEST) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/reset_password/test_reset_password.py | test_reset_ok | self.assertTrue | func_call | 42 | import time
from unittest import skip
from unittest.mock import patch
import pytest
from rest_framework import status
from rest_registration.api.views.reset_password import ResetPasswordSigner
from tests.helpers.api_views import (
assert_response_is_bad_request,
assert_response_is_ok
)
from tests.helpers.cons... | user.check_password(new_password)) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/reset_password/test_send_reset_password_link.py | test_no_templates_reset_password_disabled | assert_* | numeric_literal | 44 | from unittest import skip
import pytest
from django.test.utils import override_settings
from rest_framework import status
from rest_registration.api.views.reset_password import ResetPasswordSigner
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.constants import (
RESET_PASSWORD_VERIFI... | 0) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/reset_password/test_send_reset_password_link.py | assert_valid_send_link_email | assert_* | variable | 34 | from unittest import skip
import pytest
from django.test.utils import override_settings
from rest_framework import status
from rest_registration.api.views.reset_password import ResetPasswordSigner
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.constants import (
RESET_PASSWORD_VERIFI... | url) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/reset_password/test_send_reset_password_link.py | test_ok_when_custom_verification_templates_selector | assert_* | variable | 48 | from unittest import skip
import pytest
from django.test.utils import override_settings
from rest_framework import status
from rest_registration.api.views.reset_password import ResetPasswordSigner
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.constants import (
RESET_PASSWORD_VERIFI... | timer) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/reset_password/test_send_reset_password_link.py | assert_valid_send_link_email | assert | complex_expr | 41 | from unittest import skip
import pytest
from django.test.utils import override_settings
from rest_framework import status
from rest_registration.api.views.reset_password import ResetPasswordSigner
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.constants import (
RESET_PASSWORD_VERIFI... | user.id | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/reset_password/test_send_reset_password_link.py | _assert_valid_verification_data | self.assertEqual | complex_expr | 50 | from unittest import skip
import pytest
from django.test.utils import override_settings
from rest_framework import status
from rest_registration.api.views.reset_password import ResetPasswordSigner
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.constants import (
RESET_PASSWORD_VERIFI... | user.id) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/reset_password/test_send_reset_password_link.py | test_ok_when_custom_verification_templates_selector | assert_* | variable | 42 | from unittest import skip
import pytest
from django.test.utils import override_settings
from rest_framework import status
from rest_registration.api.views.reset_password import ResetPasswordSigner
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.constants import (
RESET_PASSWORD_VERIFI... | response) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/reset_password/test_send_reset_password_link.py | test_ok_when_custom_verification_templates_selector | assert_* | variable | 43 | from unittest import skip
import pytest
from django.test.utils import override_settings
from rest_framework import status
from rest_registration.api.views.reset_password import ResetPasswordSigner
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.constants import (
RESET_PASSWORD_VERIFI... | sent_emails) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/reset_password/test_send_reset_password_link.py | assert_valid_send_link_email | assert | collection | 32 | from unittest import skip
import pytest
from django.test.utils import override_settings
from rest_framework import status
from rest_registration.api.views.reset_password import ResetPasswordSigner
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.constants import (
RESET_PASSWORD_VERIFI... | [user.email] | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/test_change_password.py | test_invalid_old_password | assert_* | variable | 17 | from django.test.utils import override_settings
from rest_framework import status
from rest_framework.test import force_authenticate
from .base import APIViewTestCase
class ChangePasswordTestCase(_BaseChangePasswordTestCase):
def test_invalid_old_password(self):
new_password = 'newtestpassword'
r... | response) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/test_change_password.py | test_forbidden | assert_* | complex_expr | 20 | from django.test.utils import override_settings
from rest_framework import status
from rest_framework.test import force_authenticate
from .base import APIViewTestCase
class _BaseChangePasswordTestCase(APIViewTestCase):
VIEW_NAME = 'change-password'
def setUp(self):
super().setUp()
self.passwo... | status.HTTP_403_FORBIDDEN) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/test_change_password.py | test_ok | self.assertTrue | func_call | 19 | from django.test.utils import override_settings
from rest_framework import status
from rest_framework.test import force_authenticate
from .base import APIViewTestCase
class ChangePasswordTestCase(_BaseChangePasswordTestCase):
def test_ok(self):
new_password = 'newtestpassword'
response = self._te... | self.user.check_password(new_password)) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/test_change_password.py | test_invalid_old_password | self.assertTrue | func_call | 19 | from django.test.utils import override_settings
from rest_framework import status
from rest_framework.test import force_authenticate
from .base import APIViewTestCase
class ChangePasswordTestCase(_BaseChangePasswordTestCase):
def test_invalid_old_password(self):
new_password = 'newtestpassword'
r... | self.user.check_password(self.password)) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/test_profile.py | test_patch_names_ok | self.assertEqual | string_literal | 47 | import pytest
from rest_framework import status
from rest_framework.test import force_authenticate
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.views import ViewProvider
from .base import APIViewTestCase
class ProfileViewTestCase(APIViewTestCase):
VIEW_NAME = 'profile'
USERNAM... | 'Knuth') | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/test_profile.py | test_update_email_via_profile | assert | variable | 31 | import pytest
from rest_framework import status
from rest_framework.test import force_authenticate
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.views import ViewProvider
from .base import APIViewTestCase
def api_view_provider():
return ViewProvider('profile')
def old_email(email_... | old_email | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/test_profile.py | test_update_email_via_profile | assert_* | variable | 29 | import pytest
from rest_framework import status
from rest_framework.test import force_authenticate
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.views import ViewProvider
from .base import APIViewTestCase
def api_view_provider():
return ViewProvider('profile')
def old_email(email_... | response) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/test_profile.py | test_patch_names_ok | self.assertEqual | string_literal | 46 | import pytest
from rest_framework import status
from rest_framework.test import force_authenticate
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.views import ViewProvider
from .base import APIViewTestCase
class ProfileViewTestCase(APIViewTestCase):
VIEW_NAME = 'profile'
USERNAM... | 'Donald') | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/test_profile.py | test_patch_username_ok | self.assertEqual | string_literal | 44 | import pytest
from rest_framework import status
from rest_framework.test import force_authenticate
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.views import ViewProvider
from .base import APIViewTestCase
class ProfileViewTestCase(APIViewTestCase):
VIEW_NAME = 'profile'
USERNAM... | 'dknuth') | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/test_profile.py | test_retrieve_ok | self.assertEqual | complex_expr | 34 | import pytest
from rest_framework import status
from rest_framework.test import force_authenticate
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.views import ViewProvider
from .base import APIViewTestCase
class ProfileViewTestCase(APIViewTestCase):
VIEW_NAME = 'profile'
USERNAM... | self.user.id) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/test_profile.py | test_patch_names_ok | self.assertEqual | complex_expr | 44 | import pytest
from rest_framework import status
from rest_framework.test import force_authenticate
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.views import ViewProvider
from .base import APIViewTestCase
class ProfileViewTestCase(APIViewTestCase):
VIEW_NAME = 'profile'
USERNAM... | self.user_id) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/test_profile.py | test_patch_names_ok | self.assertEqual | complex_expr | 45 | import pytest
from rest_framework import status
from rest_framework.test import force_authenticate
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.views import ViewProvider
from .base import APIViewTestCase
class ProfileViewTestCase(APIViewTestCase):
VIEW_NAME = 'profile'
USERNAM... | self.USERNAME) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/test_profile.py | test_patch_username_ok | self.assertEqual | complex_expr | 46 | import pytest
from rest_framework import status
from rest_framework.test import force_authenticate
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.views import ViewProvider
from .base import APIViewTestCase
class ProfileViewTestCase(APIViewTestCase):
VIEW_NAME = 'profile'
USERNAM... | self.LAST_NAME) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
apragacz/django-rest-registration | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | train | train | tests/api/views/test_profile.py | test_patch_username_ok | self.assertEqual | complex_expr | 45 | import pytest
from rest_framework import status
from rest_framework.test import force_authenticate
from tests.helpers.api_views import assert_response_is_ok
from tests.helpers.views import ViewProvider
from .base import APIViewTestCase
class ProfileViewTestCase(APIViewTestCase):
VIEW_NAME = 'profile'
USERNAM... | self.FIRST_NAME) | 52412821c560e0e32e5189f0fedfde28027a6e12 | 128 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.