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
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_dependencies.py
test_authx_dependency_methods
assert
string_literal
19
from unittest.mock import Mock from fastapi import Response from authx import AuthXDependency async def test_authx_dependency_methods(): authx = MockAuthX() request = Mock(scope={"type": "http"}) response = Mock(spec=Response) authx_dependency = AuthXDependency(authx, request, response) assert ...
"access_token"
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_dependencies.py
test_authx_dependency_methods
assert
string_literal
22
from unittest.mock import Mock from fastapi import Response from authx import AuthXDependency async def test_authx_dependency_methods(): authx = MockAuthX() request = Mock(scope={"type": "http"}) response = Mock(spec=Response) authx_dependency = AuthXDependency(authx, request, response) assert ...
"refresh_token"
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_dependencies.py
test_authx_dependency_methods
assert
string_literal
40
from unittest.mock import Mock from fastapi import Response from authx import AuthXDependency async def test_authx_dependency_methods(): authx = MockAuthX() request = Mock(scope={"type": "http"}) response = Mock(spec=Response) authx_dependency = AuthXDependency(authx, request, response) assert ...
"current_subject"
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_errors.py
test_error_handler
assert
numeric_literal
37
import json from typing import Type import pytest from fastapi import FastAPI, Request from fastapi.responses import JSONResponse from fastapi.testclient import TestClient import authx.exceptions as exc from authx import AuthX from authx._internal import _ErrorHandler def authx(): return AuthX() def app(): ...
100
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_errors.py
test_invalid_token_init
assert
variable
29
import json from typing import Type import pytest from fastapi import FastAPI, Request from fastapi.responses import JSONResponse from fastapi.testclient import TestClient import authx.exceptions as exc from authx import AuthX from authx._internal import _ErrorHandler def authx(): return AuthX() def app(): ...
errors
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_errors.py
test_set_app_exception_handler
assert
variable
93
import json from typing import Type import pytest from fastapi import FastAPI, Request from fastapi.responses import JSONResponse from fastapi.testclient import TestClient import authx.exceptions as exc from authx import AuthX from authx._internal import _ErrorHandler def authx(): return AuthX() def app(): ...
status_code
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_errors.py
test_handle_app_errors
assert
complex_expr
29
import json from typing import Type import pytest from fastapi import FastAPI, Request from fastapi.responses import JSONResponse from fastapi.testclient import TestClient import authx.exceptions as exc from authx import AuthX from authx._internal import _ErrorHandler def authx(): return AuthX() def app(): ...
app.exception_handlers
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_errors.py
test_set_app_exception_handler
assert
collection
94
import json from typing import Type import pytest from fastapi import FastAPI, Request from fastapi.responses import JSONResponse from fastapi.testclient import TestClient import authx.exceptions as exc from authx import AuthX from authx._internal import _ErrorHandler def authx(): return AuthX() def app(): ...
{ "message": expected_message, "error_type": exception.__name__, }
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_errors.py
test_error_handler
assert
collection
38
import json from typing import Type import pytest from fastapi import FastAPI, Request from fastapi.responses import JSONResponse from fastapi.testclient import TestClient import authx.exceptions as exc from authx import AuthX from authx._internal import _ErrorHandler def authx(): return AuthX() def app(): ...
{ "message": "Sample Message", "error_type": ValueError.__name__, }
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_errors.py
test_error_handler_without_message
assert
collection
38
import json from typing import Type import pytest from fastapi import FastAPI, Request from fastapi.responses import JSONResponse from fastapi.testclient import TestClient import authx.exceptions as exc from authx import AuthX from authx._internal import _ErrorHandler def authx(): return AuthX() def app(): ...
{ "message": "Execution Message", "error_type": ValueError.__name__, }
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_implicit_middleware.py
test_implicit_refresh_middleware_with_refresh_once
assert
numeric_literal
55
from unittest.mock import Mock, patch import pytest from fastapi import FastAPI, Request from fastapi.testclient import TestClient from authx import AuthX, AuthXConfig def app(): return FastAPI() def authx(): config = AuthXConfig( JWT_IMPLICIT_REFRESH_ROUTE_EXCLUDE=["/excluded"], JWT_IMPLICI...
200
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_implicit_middleware.py
test_implicit_refresh_middleware_excluded_method
assert
collection
43
from unittest.mock import Mock, patch import pytest from fastapi import FastAPI, Request from fastapi.testclient import TestClient from authx import AuthX, AuthXConfig def app(): return FastAPI() def authx(): config = AuthXConfig( JWT_IMPLICIT_REFRESH_ROUTE_EXCLUDE=["/excluded"], JWT_IMPLICI...
{"message": "post"}
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_implicit_middleware.py
test_implicit_refresh_middleware_with_refresh_once
assert
collection
56
from unittest.mock import Mock, patch import pytest from fastapi import FastAPI, Request from fastapi.testclient import TestClient from authx import AuthX, AuthXConfig def app(): return FastAPI() def authx(): config = AuthXConfig( JWT_IMPLICIT_REFRESH_ROUTE_EXCLUDE=["/excluded"], JWT_IMPLICI...
{"message": "success"}
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_implicit_middleware.py
test_implicit_refresh_middleware_excluded_route
assert
collection
43
from unittest.mock import Mock, patch import pytest from fastapi import FastAPI, Request from fastapi.testclient import TestClient from authx import AuthX, AuthXConfig def app(): return FastAPI() def authx(): config = AuthXConfig( JWT_IMPLICIT_REFRESH_ROUTE_EXCLUDE=["/excluded"], JWT_IMPLICI...
{"message": "excluded"}
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_schema.py
test_payload_extra_dict
assert
collection
111
import datetime import jwt import pytest from authx.exceptions import ( CSRFError, FreshTokenRequiredError, JWTDecodeError, RefreshTokenRequiredError, TokenTypeError, ) from authx.schema import PYDANTIC_V2, RequestToken, TokenPayload def valid_payload(): return TokenPayload( type="acc...
{}
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_schema.py
test_payload_has_scopes
assert
bool_literal
99
import datetime import jwt import pytest from authx.exceptions import ( CSRFError, FreshTokenRequiredError, JWTDecodeError, RefreshTokenRequiredError, TokenTypeError, ) from authx.schema import PYDANTIC_V2, RequestToken, TokenPayload def valid_payload(): return TokenPayload( type="acc...
False
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_schema.py
test_token_payload_creation
assert
string_literal
99
import datetime import jwt import pytest from authx.exceptions import ( CSRFError, FreshTokenRequiredError, JWTDecodeError, RefreshTokenRequiredError, TokenTypeError, ) from authx.schema import PYDANTIC_V2, RequestToken, TokenPayload def valid_payload(): return TokenPayload( type="acc...
"access"
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_schema.py
test_token_verify_invalid
pytest.raises
variable
117
import datetime import jwt import pytest from authx.exceptions import ( CSRFError, FreshTokenRequiredError, JWTDecodeError, RefreshTokenRequiredError, TokenTypeError, ) from authx.schema import PYDANTIC_V2, RequestToken, TokenPayload def valid_payload(): return TokenPayload( type="acc...
CSRFError)
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_schema.py
test_payload_issued_at_property
pytest.raises
variable
111
import datetime import jwt import pytest from authx.exceptions import ( CSRFError, FreshTokenRequiredError, JWTDecodeError, RefreshTokenRequiredError, TokenTypeError, ) from authx.schema import PYDANTIC_V2, RequestToken, TokenPayload def valid_payload(): return TokenPayload( type="acc...
TypeError)
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_schema.py
test_token_payload_creation
assert
string_literal
98
import datetime import jwt import pytest from authx.exceptions import ( CSRFError, FreshTokenRequiredError, JWTDecodeError, RefreshTokenRequiredError, TokenTypeError, ) from authx.schema import PYDANTIC_V2, RequestToken, TokenPayload def valid_payload(): return TokenPayload( type="acc...
"1234567890"
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_schema.py
test_token_verify_invalid
pytest.raises
variable
99
import datetime import jwt import pytest from authx.exceptions import ( CSRFError, FreshTokenRequiredError, JWTDecodeError, RefreshTokenRequiredError, TokenTypeError, ) from authx.schema import PYDANTIC_V2, RequestToken, TokenPayload def valid_payload(): return TokenPayload( type="acc...
JWTDecodeError)
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_schema.py
test_token_verify_invalid
pytest.raises
variable
108
import datetime import jwt import pytest from authx.exceptions import ( CSRFError, FreshTokenRequiredError, JWTDecodeError, RefreshTokenRequiredError, TokenTypeError, ) from authx.schema import PYDANTIC_V2, RequestToken, TokenPayload def valid_payload(): return TokenPayload( type="acc...
TokenTypeError)
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_schema.py
test_payload_decode
assert
complex_expr
101
import datetime import jwt import pytest from authx.exceptions import ( CSRFError, FreshTokenRequiredError, JWTDecodeError, RefreshTokenRequiredError, TokenTypeError, ) from authx.schema import PYDANTIC_V2, RequestToken, TokenPayload def valid_payload(): return TokenPayload( type="acc...
valid_payload.sub
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_schema.py
test_payload_decode
assert
complex_expr
102
import datetime import jwt import pytest from authx.exceptions import ( CSRFError, FreshTokenRequiredError, JWTDecodeError, RefreshTokenRequiredError, TokenTypeError, ) from authx.schema import PYDANTIC_V2, RequestToken, TokenPayload def valid_payload(): return TokenPayload( type="acc...
valid_payload.nbf
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_token.py
test_create_token_with_timed_claims
assert
numeric_literal
51
import time from datetime import datetime, timedelta, timezone import pytest from authx.exceptions import JWTDecodeError from authx.token import create_token, decode_token @pytest.mark.parametrize("claim,argument", [("exp", "expiry"), ("nbf", "not_before")]) def test_create_token_with_timed_claims(claim, argument): ...
1
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_token.py
test_create_token_with_iat_claims
assert
variable
29
import time from datetime import datetime, timedelta, timezone import pytest from authx.exceptions import JWTDecodeError from authx.token import create_token, decode_token def test_create_token_with_iat_claims(): KEY = "SECRET" ALGO = "HS256" now = datetime.now(tz=timezone.utc) # Issued as datetime...
now
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_token.py
test_encode_decode_token
assert
none_literal
24
import time from datetime import datetime, timedelta, timezone import pytest from authx.exceptions import JWTDecodeError from authx.token import create_token, decode_token def test_encode_decode_token(): KEY = "SECRET" ALGO = "HS256" token = create_token(uid="TEST", key=KEY, algorithm=ALGO, type="TYPE",...
None
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_token.py
test_create_token_with_fresh_claims
assert
bool_literal
36
import time from datetime import datetime, timedelta, timezone import pytest from authx.exceptions import JWTDecodeError from authx.token import create_token, decode_token def test_create_token_with_fresh_claims(): KEY = "SECRET" ALGO = "HS256" token = create_token( uid="TEST", key=KEY, ...
True
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_token.py
test_create_token_with_additional_claims
assert
string_literal
25
import time from datetime import datetime, timedelta, timezone import pytest from authx.exceptions import JWTDecodeError from authx.token import create_token, decode_token def test_create_token_with_additional_claims(): KEY = "SECRET" ALGO = "HS256" token = create_token( uid="TEST", key=...
"bar"
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_token.py
test_encode_decode_token
assert
string_literal
22
import time from datetime import datetime, timedelta, timezone import pytest from authx.exceptions import JWTDecodeError from authx.token import create_token, decode_token def test_encode_decode_token(): KEY = "SECRET" ALGO = "HS256" token = create_token(uid="TEST", key=KEY, algorithm=ALGO, type="TYPE",...
"TEST"
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
yezz123/authx
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
train
train
tests/test_token.py
test_encode_decode_token
assert
string_literal
23
import time from datetime import datetime, timedelta, timezone import pytest from authx.exceptions import JWTDecodeError from authx.token import create_token, decode_token def test_encode_decode_token(): KEY = "SECRET" ALGO = "HS256" token = create_token(uid="TEST", key=KEY, algorithm=ALGO, type="TYPE",...
"TYPE"
acf5543f654819bdcb000f7a0e399f9e0b175d52
51
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/test_handler.py
test_run_function
self.assertEqual
string_literal
43
from mock import Mock import sys import unittest from zappa.handler import LambdaHandler from zappa.utilities import merge_headers def no_args(): return def one_arg(first): return first def two_args(first, second): return first, second def var_args(*args): return args def var_args_with_one(first, *...
"e")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/test_handler.py
test_wsgi_script_name_on_aws_url
self.assertEqual
numeric_literal
63
from mock import Mock import sys import unittest from zappa.handler import LambdaHandler from zappa.utilities import merge_headers def no_args(): return def one_arg(first): return first def two_args(first, second): return first, second def var_args(*args): return args def var_args_with_one(first, *...
200)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/test_handler.py
test_exception_handler_on_web_request
self.assertEqual
numeric_literal
64
from mock import Mock import sys import unittest from zappa.handler import LambdaHandler from zappa.utilities import merge_headers def no_args(): return def one_arg(first): return first def two_args(first, second): return first, second def var_args(*args): return args def var_args_with_one(first, *...
500)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/test_handler.py
test_merge_headers_no_multi_value
self.assertEqual
string_literal
45
from mock import Mock import sys import unittest from zappa.handler import LambdaHandler from zappa.utilities import merge_headers def no_args(): return def one_arg(first): return first def two_args(first, second): return first, second def var_args(*args): return args def var_args_with_one(first, *...
"b")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/test_handler.py
test_merge_headers_combine_values
self.assertEqual
string_literal
48
from mock import Mock import sys import unittest from zappa.handler import LambdaHandler from zappa.utilities import merge_headers def no_args(): return def one_arg(first): return first def two_args(first, second): return first, second def var_args(*args): return args def var_args_with_one(first, *...
"c")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/test_handler.py
test_merge_headers_combine_values
self.assertEqual
string_literal
49
from mock import Mock import sys import unittest from zappa.handler import LambdaHandler from zappa.utilities import merge_headers def no_args(): return def one_arg(first): return first def two_args(first, second): return first, second def var_args(*args): return args def var_args_with_one(first, *...
"y")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/test_handler.py
test_merge_headers_combine_values
self.assertEqual
string_literal
50
from mock import Mock import sys import unittest from zappa.handler import LambdaHandler from zappa.utilities import merge_headers def no_args(): return def one_arg(first): return first def two_args(first, second): return first, second def var_args(*args): return args def var_args_with_one(first, *...
"q")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/test_handler.py
test_cloudwatch_subscription_event
self.assertEqual
bool_literal
54
from mock import Mock import sys import unittest from zappa.handler import LambdaHandler from zappa.utilities import merge_headers def no_args(): return def one_arg(first): return first def two_args(first, second): return first, second def var_args(*args): return args def var_args_with_one(first, *...
True)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/test_handler.py
test_wsgi_script_on_cognito_event_request
self.assertEqual
bool_literal
70
from mock import Mock import sys import unittest from zappa.handler import LambdaHandler from zappa.utilities import merge_headers def no_args(): return def one_arg(first): return first def two_args(first, second): return first, second def var_args(*args): return args def var_args_with_one(first, *...
False)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/test_handler.py
test_merge_headers_no_single_value
self.assertEqual
string_literal
44
from mock import Mock import sys import unittest from zappa.handler import LambdaHandler from zappa.utilities import merge_headers def no_args(): return def one_arg(first): return first def two_args(first, second): return first, second def var_args(*args): return args def var_args_with_one(first, *...
"c, d")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/test_handler.py
test_wsgi_script_name_with_multi_value_header
self.assertIn
variable
63
from mock import Mock import sys import unittest from zappa.handler import LambdaHandler from zappa.utilities import merge_headers def no_args(): return def one_arg(first): return first def two_args(first, second): return first, second def var_args(*args): return args def var_args_with_one(first, *...
response)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/test_handler.py
test_wsgi_script_name_on_alb_event
self.assertEqual
string_literal
76
from mock import Mock import sys import unittest from zappa.handler import LambdaHandler from zappa.utilities import merge_headers def no_args(): return def one_arg(first): return first def two_args(first, second): return first, second def var_args(*args): return args def var_args_with_one(first, *...
"200 OK")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/test_handler.py
test_bot_triggered_event
self.assertEqual
string_literal
70
from mock import Mock import sys import unittest from zappa.handler import LambdaHandler from zappa.utilities import merge_headers def no_args(): return def one_arg(first): return first def two_args(first, second): return first, second def var_args(*args): return args def var_args_with_one(first, *...
"Success")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/test_handler.py
test_merge_headers_no_single_value
self.assertEqual
string_literal
45
from mock import Mock import sys import unittest from zappa.handler import LambdaHandler from zappa.utilities import merge_headers def no_args(): return def one_arg(first): return first def two_args(first, second): return first, second def var_args(*args): return args def var_args_with_one(first, *...
"y, z, f")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests.py
test_copy_editable_packages
self.assertEqual
numeric_literal
124
import collections import json from io import BytesIO import botocore import botocore.stub import flask import mock import os import random import string import zipfile import unittest import shutil import sys import tempfile import uuid from click.globals import resolve_color_default from click.exceptions import Cli...
1)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests.py
test_s3_url_parser
self.assertEqual
string_literal
107
import collections import json from io import BytesIO import botocore import botocore.stub import flask import mock import os import random import string import zipfile import unittest import shutil import sys import tempfile import uuid from click.globals import resolve_color_default from click.exceptions import Cli...
"")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests.py
test_update_layers
self.assertEqual
collection
94
import collections import json from io import BytesIO import botocore import botocore.stub import flask import mock import os import random import string import zipfile import unittest import shutil import sys import tempfile import uuid from click.globals import resolve_color_default from click.exceptions import Cli...
[])
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests.py
test_domain_name_match
assert
none_literal
107
import collections import json from io import BytesIO import botocore import botocore.stub import flask import mock import os import random import string import zipfile import unittest import shutil import sys import tempfile import uuid from click.globals import resolve_color_default from click.exceptions import Cli...
None
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests.py
test_disable_click_colors
assert
bool_literal
80
import collections import json from io import BytesIO import botocore import botocore.stub import flask import mock import os import random import string import zipfile import unittest import shutil import sys import tempfile import uuid from click.globals import resolve_color_default from click.exceptions import Cli...
False
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests.py
test_test
self.assertTrue
bool_literal
79
import collections import json from io import BytesIO import botocore import botocore.stub import flask import mock import os import random import string import zipfile import unittest import shutil import sys import tempfile import uuid from click.globals import resolve_color_default from click.exceptions import Cli...
True)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests.py
test_event_name
self.assertEqual
string_literal
95
import collections import json from io import BytesIO import botocore import botocore.stub import flask import mock import os import random import string import zipfile import unittest import shutil import sys import tempfile import uuid from click.globals import resolve_color_default from click.exceptions import Cli...
"a-b")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests.py
test_get_domain_respects_route53_setting
self.assertIsNotNone
variable
92
import collections import json from io import BytesIO import botocore import botocore.stub import flask import mock import os import random import string import zipfile import unittest import shutil import sys import tempfile import uuid from click.globals import resolve_color_default from click.exceptions import Cli...
record)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests.py
test_load_credentials
self.assertEqual
string_literal
101
import collections import json from io import BytesIO import botocore import botocore.stub import flask import mock import os import random import string import zipfile import unittest import shutil import sys import tempfile import uuid from click.globals import resolve_color_default from click.exceptions import Cli...
"AK123")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests.py
test_string_to_timestamp
self.assertTrue
complex_expr
84
import collections import json from io import BytesIO import botocore import botocore.stub import flask import mock import os import random import string import zipfile import unittest import shutil import sys import tempfile import uuid from click.globals import resolve_color_default from click.exceptions import Cli...
yay > 0)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests.py
test_settings_py_generation
self.assertEqual
string_literal
100
import collections import json from io import BytesIO import botocore import botocore.stub import flask import mock import os import random import string import zipfile import unittest import shutil import sys import tempfile import uuid from click.globals import resolve_color_default from click.exceptions import Cli...
"stage")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_async.py
test_async_call_with_defaults
assert_*
collection
57
import boto3 import mock import os import unittest from zappa.asynchronous import AsyncException, LambdaAsyncResponse, SnsAsyncResponse from zappa.asynchronous import import_and_get_task, get_func_task_path class TestZappa(unittest.TestCase): def setUp(self): self.sleep_patch = mock.patch("time.sleep", re...
{})
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_async.py
test_test
self.assertTrue
bool_literal
29
import boto3 import mock import os import unittest from zappa.asynchronous import AsyncException, LambdaAsyncResponse, SnsAsyncResponse from zappa.asynchronous import import_and_get_task, get_func_task_path class TestZappa(unittest.TestCase): def setUp(self): self.sleep_patch = mock.patch("time.sleep", re...
True)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_async.py
test_test
self.assertFalse
bool_literal
30
import boto3 import mock import os import unittest from zappa.asynchronous import AsyncException, LambdaAsyncResponse, SnsAsyncResponse from zappa.asynchronous import import_and_get_task, get_func_task_path class TestZappa(unittest.TestCase): def setUp(self): self.sleep_patch = mock.patch("time.sleep", re...
False)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_async.py
test_nofails_funcs
self.assertEqual
string_literal
31
import boto3 import mock import os import unittest from zappa.asynchronous import AsyncException, LambdaAsyncResponse, SnsAsyncResponse from zappa.asynchronous import import_and_get_task, get_func_task_path class TestZappa(unittest.TestCase): def setUp(self): self.sleep_patch = mock.patch("time.sleep", re...
"async_me")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_async.py
test_async_call_with_defaults
self.assertEqual
string_literal
48
import boto3 import mock import os import unittest from zappa.asynchronous import AsyncException, LambdaAsyncResponse, SnsAsyncResponse from zappa.asynchronous import import_and_get_task, get_func_task_path class TestZappa(unittest.TestCase): def setUp(self): self.sleep_patch = mock.patch("time.sleep", re...
"Running async!")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_async.py
test_sync_call
self.assertEqual
string_literal
30
import boto3 import mock import os import unittest from zappa.asynchronous import AsyncException, LambdaAsyncResponse, SnsAsyncResponse from zappa.asynchronous import import_and_get_task, get_func_task_path class TestZappa(unittest.TestCase): def setUp(self): self.sleep_patch = mock.patch("time.sleep", re...
"run async when on lambda 123")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_async_old.py
test_async_call_with_defaults
assert_*
collection
70
import boto3 import mock import os import unittest zappa_async = __import__( "zappa.async", fromlist=[ "AsyncException", "LambdaAsyncResponse", "SnsAsyncResponse", "import_and_get_task", "get_func_task_path", ], ) AsyncException = zappa_async.AsyncException LambdaAsy...
{})
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_async_old.py
test_test
self.assertTrue
bool_literal
42
import boto3 import mock import os import unittest zappa_async = __import__( "zappa.async", fromlist=[ "AsyncException", "LambdaAsyncResponse", "SnsAsyncResponse", "import_and_get_task", "get_func_task_path", ], ) AsyncException = zappa_async.AsyncException LambdaAsy...
True)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_async_old.py
test_test
self.assertFalse
bool_literal
43
import boto3 import mock import os import unittest zappa_async = __import__( "zappa.async", fromlist=[ "AsyncException", "LambdaAsyncResponse", "SnsAsyncResponse", "import_and_get_task", "get_func_task_path", ], ) AsyncException = zappa_async.AsyncException LambdaAsy...
False)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_async_old.py
test_nofails_funcs
self.assertEqual
string_literal
44
import boto3 import mock import os import unittest zappa_async = __import__( "zappa.async", fromlist=[ "AsyncException", "LambdaAsyncResponse", "SnsAsyncResponse", "import_and_get_task", "get_func_task_path", ], ) AsyncException = zappa_async.AsyncException LambdaAsy...
"async_me")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_async_old.py
test_async_call_with_defaults
self.assertEqual
string_literal
61
import boto3 import mock import os import unittest zappa_async = __import__( "zappa.async", fromlist=[ "AsyncException", "LambdaAsyncResponse", "SnsAsyncResponse", "import_and_get_task", "get_func_task_path", ], ) AsyncException = zappa_async.AsyncException LambdaAsy...
"Running async!")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_async_old.py
test_sync_call
self.assertEqual
string_literal
43
import boto3 import mock import os import unittest zappa_async = __import__( "zappa.async", fromlist=[ "AsyncException", "LambdaAsyncResponse", "SnsAsyncResponse", "import_and_get_task", "get_func_task_path", ], ) AsyncException = zappa_async.AsyncException LambdaAsy...
"run async when on lambda 123")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_middleware.py
test_all_casings
self.assertEqual
numeric_literal
35
import sys import unittest from zappa.wsgi import create_wsgi_request from zappa.middleware import ZappaWSGIMiddleware, all_casings class TestWSGIMockMiddleWare(unittest.TestCase): def setUp(self): """ Set the test up with default headers and status codes. """ self.headers = list(...
1)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_middleware.py
test_should_allow_empty_query_params
self.assertEqual
string_literal
51
import sys import unittest from zappa.wsgi import create_wsgi_request from zappa.middleware import ZappaWSGIMiddleware, all_casings class TestWSGIMockMiddleWare(unittest.TestCase): def setUp(self): """ Set the test up with default headers and status codes. """ self.headers = list(...
"")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_middleware.py
test_all_casings
self.assertEqual
numeric_literal
28
import sys import unittest from zappa.wsgi import create_wsgi_request from zappa.middleware import ZappaWSGIMiddleware, all_casings class TestWSGIMockMiddleWare(unittest.TestCase): def setUp(self): """ Set the test up with default headers and status codes. """ self.headers = list(...
512)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_middleware.py
test_wsgi_map_context_headers_handling
self.assertEqual
string_literal
86
import sys import unittest from zappa.wsgi import create_wsgi_request from zappa.middleware import ZappaWSGIMiddleware, all_casings class TestWSGIMockMiddleWare(unittest.TestCase): def setUp(self): """ Set the test up with default headers and status codes. """ self.headers = list(...
"prod")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_middleware.py
test_wsgi_authorizer_handling
self.assertEqual
string_literal
38
import sys import unittest from zappa.wsgi import create_wsgi_request from zappa.middleware import ZappaWSGIMiddleware, all_casings class TestWSGIMockMiddleWare(unittest.TestCase): def setUp(self): """ Set the test up with default headers and status codes. """ self.headers = list(...
"user1")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_middleware.py
test_wsgi_map_context_headers_handling
self.assertNotIn
variable
87
import sys import unittest from zappa.wsgi import create_wsgi_request from zappa.middleware import ZappaWSGIMiddleware, all_casings class TestWSGIMockMiddleWare(unittest.TestCase): def setUp(self): """ Set the test up with default headers and status codes. """ self.headers = list(...
environ)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_middleware.py
test_wsgi_authorizer_handling
self.assertEqual
string_literal
57
import sys import unittest from zappa.wsgi import create_wsgi_request from zappa.middleware import ZappaWSGIMiddleware, all_casings class TestWSGIMockMiddleWare(unittest.TestCase): def setUp(self): """ Set the test up with default headers and status codes. """ self.headers = list(...
"no_user")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_middleware.py
test_wsgi_map_context_headers_handling
self.assertEqual
string_literal
85
import sys import unittest from zappa.wsgi import create_wsgi_request from zappa.middleware import ZappaWSGIMiddleware, all_casings class TestWSGIMockMiddleWare(unittest.TestCase): def setUp(self): """ Set the test up with default headers and status codes. """ self.headers = list(...
"myCognitoID")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_middleware.py
test_should_handle_multi_value_query_string_params
self.assertEqual
string_literal
51
import sys import unittest from zappa.wsgi import create_wsgi_request from zappa.middleware import ZappaWSGIMiddleware, all_casings class TestWSGIMockMiddleWare(unittest.TestCase): def setUp(self): """ Set the test up with default headers and status codes. """ self.headers = list(...
"foo=1&foo=2")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_placebo.py
test_upload_remove_s3
self.assertTrue
variable
42
import mock import os import random import string import unittest from .utils import placebo_session from zappa.cli import ZappaCLI from zappa.handler import LambdaHandler from zappa.utilities import add_event_source, remove_event_source from zappa.core import Zappa def random_string(length): return "".join(rand...
res)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_placebo.py
test_upload_remove_s3
self.assertFalse
variable
57
import mock import os import random import string import unittest from .utils import placebo_session from zappa.cli import ZappaCLI from zappa.handler import LambdaHandler from zappa.utilities import add_event_source, remove_event_source from zappa.core import Zappa def random_string(length): return "".join(rand...
fail)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_placebo.py
test_handler
self.assertEqual
string_literal
44
import mock import os import random import string import unittest from .utils import placebo_session from zappa.cli import ZappaCLI from zappa.handler import LambdaHandler from zappa.utilities import add_event_source, remove_event_source from zappa.core import Zappa def random_string(length): return "".join(rand...
"world")
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_placebo.py
test_rollback_lambda_function_version
self.assertFalse
variable
43
import mock import os import random import string import unittest from .utils import placebo_session from zappa.cli import ZappaCLI from zappa.handler import LambdaHandler from zappa.utilities import add_event_source, remove_event_source from zappa.core import Zappa def random_string(length): return "".join(rand...
too_many_versions)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_placebo.py
test_fetch_logs
self.assertTrue
complex_expr
41
import mock import os import random import string import unittest from .utils import placebo_session from zappa.cli import ZappaCLI from zappa.handler import LambdaHandler from zappa.utilities import add_event_source, remove_event_source from zappa.core import Zappa def random_string(length): return "".join(rand...
events is not None)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_placebo.py
test_rollback_lambda_function_version_docker
self.assertRaises
variable
43
import mock import os import random import string import unittest from .utils import placebo_session from zappa.cli import ZappaCLI from zappa.handler import LambdaHandler from zappa.utilities import add_event_source, remove_event_source from zappa.core import Zappa def random_string(length): return "".join(rand...
NotImplementedError)
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_placebo.py
test_handler
self.assertEqual
func_call
104
import mock import os import random import string import unittest from .utils import placebo_session from zappa.cli import ZappaCLI from zappa.handler import LambdaHandler from zappa.utilities import add_event_source, remove_event_source from zappa.core import Zappa def random_string(length): return "".join(rand...
lh.handler(event, None))
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zappa/Zappa
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
train
train
tests/tests_placebo.py
test_create_iam_roles
self.assertEqual
string_literal
40
import mock import os import random import string import unittest from .utils import placebo_session from zappa.cli import ZappaCLI from zappa.handler import LambdaHandler from zappa.utilities import add_event_source, remove_event_source from zappa.core import Zappa def random_string(length): return "".join(rand...
"arn:aws:iam::123:role/{}".format(z.role_name))
26cc1d6b84000ac062dc8c0a6bf99263b995317d
182
v2_extractor_at_anchor
zeenolife/ai-baby-monitor
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
train
train
tests/configs/test_config_loader.py
test_load_room_config_file_with_optional_fields
assert
numeric_literal
38
from pathlib import Path import yaml from ai_baby_monitor.config import RoomConfig, load_room_config_file def test_load_room_config_file_with_optional_fields(tmp_path: Path): """Test loading a config file with optional fields specified.""" sample = { "name": "custom_room", "camera": { ...
8
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
v2_extractor_at_anchor
zeenolife/ai-baby-monitor
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
train
train
tests/configs/test_config_loader.py
test_load_room_config_file_with_partial_optional_fields
assert
numeric_literal
31
from pathlib import Path import yaml from ai_baby_monitor.config import RoomConfig, load_room_config_file def test_load_room_config_file_with_partial_optional_fields(tmp_path: Path): """Test loading a config file with only some optional fields specified.""" sample = { "name": "partial_room", ...
4
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
v2_extractor_at_anchor
zeenolife/ai-baby-monitor
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
train
train
tests/configs/test_config_loader.py
test_load_room_config_file_with_partial_optional_fields
assert
numeric_literal
30
from pathlib import Path import yaml from ai_baby_monitor.config import RoomConfig, load_room_config_file def test_load_room_config_file_with_partial_optional_fields(tmp_path: Path): """Test loading a config file with only some optional fields specified.""" sample = { "name": "partial_room", ...
64
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
v2_extractor_at_anchor
zeenolife/ai-baby-monitor
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
train
train
tests/configs/test_config_loader.py
test_load_room_config_file_with_partial_optional_fields
assert
collection
32
from pathlib import Path import yaml from ai_baby_monitor.config import RoomConfig, load_room_config_file def test_load_room_config_file_with_partial_optional_fields(tmp_path: Path): """Test loading a config file with only some optional fields specified.""" sample = { "name": "partial_room", ...
[]
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
v2_extractor_at_anchor
zeenolife/ai-baby-monitor
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
train
train
tests/configs/test_config_loader.py
test_load_room_config_file_with_optional_fields
assert
numeric_literal
36
from pathlib import Path import yaml from ai_baby_monitor.config import RoomConfig, load_room_config_file def test_load_room_config_file_with_optional_fields(tmp_path: Path): """Test loading a config file with optional fields specified.""" sample = { "name": "custom_room", "camera": { ...
720
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
v2_extractor_at_anchor
zeenolife/ai-baby-monitor
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
train
train
tests/configs/test_config_loader.py
test_load_room_config_file_with_optional_fields
assert
numeric_literal
37
from pathlib import Path import yaml from ai_baby_monitor.config import RoomConfig, load_room_config_file def test_load_room_config_file_with_optional_fields(tmp_path: Path): """Test loading a config file with optional fields specified.""" sample = { "name": "custom_room", "camera": { ...
100
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
v2_extractor_at_anchor
zeenolife/ai-baby-monitor
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
train
train
tests/configs/test_config_loader.py
test_load_room_config_file_with_partial_optional_fields
assert
numeric_literal
26
from pathlib import Path import yaml from ai_baby_monitor.config import RoomConfig, load_room_config_file def test_load_room_config_file_with_partial_optional_fields(tmp_path: Path): """Test loading a config file with only some optional fields specified.""" sample = { "name": "partial_room", ...
800
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
v2_extractor_at_anchor
zeenolife/ai-baby-monitor
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
train
train
tests/configs/test_config_loader.py
test_load_room_config_file_with_partial_optional_fields
assert
numeric_literal
29
from pathlib import Path import yaml from ai_baby_monitor.config import RoomConfig, load_room_config_file def test_load_room_config_file_with_partial_optional_fields(tmp_path: Path): """Test loading a config file with only some optional fields specified.""" sample = { "name": "partial_room", ...
360
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
v2_extractor_at_anchor
zeenolife/ai-baby-monitor
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
train
train
tests/configs/test_config_loader.py
test_load_room_config_file_with_optional_fields
assert
numeric_literal
35
from pathlib import Path import yaml from ai_baby_monitor.config import RoomConfig, load_room_config_file def test_load_room_config_file_with_optional_fields(tmp_path: Path): """Test loading a config file with optional fields specified.""" sample = { "name": "custom_room", "camera": { ...
1280
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
v2_extractor_at_anchor
zeenolife/ai-baby-monitor
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
train
train
tests/configs/test_config_loader.py
test_load_room_config_file_with_optional_fields
assert
string_literal
29
from pathlib import Path import yaml from ai_baby_monitor.config import RoomConfig, load_room_config_file def test_load_room_config_file_with_optional_fields(tmp_path: Path): """Test loading a config file with optional fields specified.""" sample = { "name": "custom_room", "camera": { ...
"custom_room"
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
v2_extractor_at_anchor
zeenolife/ai-baby-monitor
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
train
train
tests/stream/test_camera_stream.py
test_camera_stream_init_successful
assert
numeric_literal
65
import datetime as dt from unittest.mock import MagicMock, patch import cv2 import numpy as np import pytest from ai_baby_monitor.stream.camera_stream import CameraStream, Frame def mock_cv2_video_capture(): """Fixture for a mock cv2.VideoCapture instance.""" capture = MagicMock(spec=cv2.VideoCapture) ca...
0
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
v2_extractor_at_anchor
zeenolife/ai-baby-monitor
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
train
train
tests/stream/test_camera_stream.py
test_capture_new_frame_successful
assert
numeric_literal
84
import datetime as dt from unittest.mock import MagicMock, patch import cv2 import numpy as np import pytest from ai_baby_monitor.stream.camera_stream import CameraStream, Frame def mock_cv2_video_capture(): """Fixture for a mock cv2.VideoCapture instance.""" capture = MagicMock(spec=cv2.VideoCapture) ca...
1
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
v2_extractor_at_anchor
zeenolife/ai-baby-monitor
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
train
train
tests/stream/test_camera_stream.py
test_camera_stream_init_successful
assert
none_literal
64
import datetime as dt from unittest.mock import MagicMock, patch import cv2 import numpy as np import pytest from ai_baby_monitor.stream.camera_stream import CameraStream, Frame def mock_cv2_video_capture(): """Fixture for a mock cv2.VideoCapture instance.""" capture = MagicMock(spec=cv2.VideoCapture) ca...
None
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
v2_extractor_at_anchor
zeenolife/ai-baby-monitor
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
train
train
tests/stream/test_camera_stream.py
test_camera_stream_init_successful
assert
variable
63
import datetime as dt from unittest.mock import MagicMock, patch import cv2 import numpy as np import pytest from ai_baby_monitor.stream.camera_stream import CameraStream, Frame def mock_cv2_video_capture(): """Fixture for a mock cv2.VideoCapture instance.""" capture = MagicMock(spec=cv2.VideoCapture) ca...
mock_capture
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
v2_extractor_at_anchor
zeenolife/ai-baby-monitor
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
train
train
tests/stream/test_camera_stream.py
test_camera_stream_init_with_save
assert
variable
66
import datetime as dt from unittest.mock import MagicMock, patch import cv2 import numpy as np import pytest from ai_baby_monitor.stream.camera_stream import CameraStream, Frame def mock_cv2_video_capture(): """Fixture for a mock cv2.VideoCapture instance.""" capture = MagicMock(spec=cv2.VideoCapture) ca...
mock_writer_instance
e78e82b63881250df0e1b1c8c7bf66a539143dc8
2
v2_extractor_at_anchor