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
Kludex/mangum
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
train
train
tests/test_http.py
test_http_empty_header
assert
collection
34
import base64 import gzip import json import pytest import brotli from brotli_asgi import BrotliMiddleware from starlette.applications import Starlette from starlette.middleware.gzip import GZipMiddleware from starlette.responses import PlainTextResponse from mangum import Mangum @pytest.mark.parametrize( "mock_a...
{ "statusCode": 200, "isBase64Encoded": False, "headers": {"content-type": "text/plain; charset=utf-8"}, "multiValueHeaders": {}, "body": "Hello, world!", }
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
v2_extractor_at_anchor
Kludex/mangum
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
train
train
tests/test_http.py
test_http_exception_mid_response
assert
collection
25
import base64 import gzip import json import pytest import brotli from brotli_asgi import BrotliMiddleware from starlette.applications import Starlette from starlette.middleware.gzip import GZipMiddleware from starlette.responses import PlainTextResponse from mangum import Mangum @pytest.mark.parametrize( "mock_a...
{ "body": "Internal Server Error", "headers": {"content-type": "text/plain; charset=utf-8"}, "isBase64Encoded": False, "multiValueHeaders": {}, "statusCode": 500, }
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
v2_extractor_at_anchor
Kludex/mangum
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
train
train
tests/test_http.py
test_http_cycle_state
assert
collection
24
import base64 import gzip import json import pytest import brotli from brotli_asgi import BrotliMiddleware from starlette.applications import Starlette from starlette.middleware.gzip import GZipMiddleware from starlette.responses import PlainTextResponse from mangum import Mangum @pytest.mark.parametrize( "mock_a...
{ "body": "Internal Server Error", "headers": {"content-type": "text/plain; charset=utf-8"}, "multiValueHeaders": {}, "isBase64Encoded": False, "statusCode": 500, }
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
v2_extractor_at_anchor
Kludex/mangum
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
train
train
tests/test_http.py
test_http_exception_handler
assert
collection
33
import base64 import gzip import json import pytest import brotli from brotli_asgi import BrotliMiddleware from starlette.applications import Starlette from starlette.middleware.gzip import GZipMiddleware from starlette.responses import PlainTextResponse from mangum import Mangum @pytest.mark.parametrize( "mock_a...
{ "body": "Error!", "headers": {"content-length": "6", "content-type": "text/plain; charset=utf-8"}, "multiValueHeaders": {}, "isBase64Encoded": False, "statusCode": 500, }
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
v2_extractor_at_anchor
Kludex/mangum
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
train
train
tests/test_http.py
test_http_response
assert
collection
130
import base64 import gzip import json import pytest import brotli from brotli_asgi import BrotliMiddleware from starlette.applications import Starlette from starlette.middleware.gzip import GZipMiddleware from starlette.responses import PlainTextResponse from mangum import Mangum @pytest.mark.parametrize( "mock_a...
{ "statusCode": 200, "isBase64Encoded": False, "headers": {"content-type": "text/plain; charset=utf-8"}, "multiValueHeaders": { "set-cookie": ["cookie1=cookie1; Secure", "cookie2=cookie2; Secure"] }, "body": "Hello, world!", }
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
v2_extractor_at_anchor
Kludex/mangum
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
train
train
tests/test_lifespan.py
test_lifespan
assert
variable
76
import sys import logging import pytest from starlette.applications import Starlette from starlette.responses import PlainTextResponse from mangum import Mangum from mangum.exceptions import LifespanFailure IS_PY38 = sys.version_info[:2] == (3, 8) IS_PY36 = sys.version_info[:2] == (3, 6) @pytest.mark.parametrize( ...
expected
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
v2_extractor_at_anchor
Kludex/mangum
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
train
train
tests/test_lifespan.py
test_lifespan_error
assert
complex_expr
42
import sys import logging import pytest from starlette.applications import Starlette from starlette.responses import PlainTextResponse from mangum import Mangum from mangum.exceptions import LifespanFailure IS_PY38 = sys.version_info[:2] == (3, 8) IS_PY36 = sys.version_info[:2] == (3, 6) @pytest.mark.parametrize( ...
caplog.text
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
v2_extractor_at_anchor
Kludex/mangum
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
train
train
tests/test_lifespan.py
test_lifespan_unexpected_message
pytest.raises
variable
37
import sys import logging import pytest from starlette.applications import Starlette from starlette.responses import PlainTextResponse from mangum import Mangum from mangum.exceptions import LifespanFailure IS_PY38 = sys.version_info[:2] == (3, 8) IS_PY36 = sys.version_info[:2] == (3, 6) @pytest.mark.parametrize( ...
LifespanFailure)
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
v2_extractor_at_anchor
Kludex/mangum
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
train
train
tests/test_lifespan.py
test_lifespan
assert
collection
78
import sys import logging import pytest from starlette.applications import Starlette from starlette.responses import PlainTextResponse from mangum import Mangum from mangum.exceptions import LifespanFailure IS_PY38 = sys.version_info[:2] == (3, 8) IS_PY36 = sys.version_info[:2] == (3, 6) @pytest.mark.parametrize( ...
{ "statusCode": 200, "isBase64Encoded": False, "headers": {"content-type": "text/plain; charset=utf-8"}, "multiValueHeaders": {}, "body": "Hello, world!", }
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
v2_extractor_at_anchor
Kludex/mangum
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
train
train
tests/test_lifespan.py
test_quart_lifespan
assert
collection
50
import sys import logging import pytest from starlette.applications import Starlette from starlette.responses import PlainTextResponse from mangum import Mangum from mangum.exceptions import LifespanFailure IS_PY38 = sys.version_info[:2] == (3, 8) IS_PY36 = sys.version_info[:2] == (3, 6) @pytest.mark.skipif( IS...
{ "statusCode": 200, "isBase64Encoded": False, "headers": {"content-length": "12", "content-type": "text/html; charset=utf-8"}, "multiValueHeaders": {}, "body": "hello world!", }
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
v2_extractor_at_anchor
Kludex/mangum
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
train
train
tests/test_lifespan.py
test_starlette_lifespan
assert
collection
48
import sys import logging import pytest from starlette.applications import Starlette from starlette.responses import PlainTextResponse from mangum import Mangum from mangum.exceptions import LifespanFailure IS_PY38 = sys.version_info[:2] == (3, 8) IS_PY36 = sys.version_info[:2] == (3, 6) @pytest.mark.parametrize( ...
{ "statusCode": 200, "isBase64Encoded": False, "headers": { "content-length": "13", "content-type": "text/plain; charset=utf-8", }, "multiValueHeaders": {}, "body": "Hello, world!", }
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
v2_extractor_at_anchor
Kludex/mangum
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
train
train
tests/test_websocket.py
test_websocket_close
assert
collection
19
import respx from mangum import Mangum @respx.mock(assert_all_mocked=False) def test_websocket_close( sqlite3_dsn, mock_ws_connect_event, mock_ws_send_event ) -> None: async def app(scope, receive, send): if scope["type"] == "websocket": while True: message = await receive(...
{"statusCode": 200}
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
v2_extractor_at_anchor
Kludex/mangum
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
train
train
tests/test_websocket.py
test_websocket_close
assert
collection
22
import respx from mangum import Mangum @respx.mock(assert_all_mocked=False) def test_websocket_close( sqlite3_dsn, mock_ws_connect_event, mock_ws_send_event ) -> None: async def app(scope, receive, send): if scope["type"] == "websocket": while True: message = await receive(...
{"statusCode": 403}
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
v2_extractor_at_anchor
Kludex/mangum
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
train
train
tests/test_websocket.py
test_websocket_exception
assert
collection
17
import respx from mangum import Mangum def test_websocket_exception( sqlite3_dsn, mock_ws_connect_event, mock_ws_send_event ) -> None: async def app(scope, receive, send): raise Exception() handler = Mangum(app, dsn=sqlite3_dsn) handler(mock_ws_connect_event, {}) handler = Mangum(app, ds...
{"statusCode": 500}
c680fb3ae1d43c56c03af6fe64b41aa281b5f5fb
77
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/4_suppressed_exc.py
test_publish
assert
none_literal
7
def test_publish(test_broker): r = await test_broker.publish( {"msg": "ping"}, "ping", callback=True, callback_timeout=1 ) assert r ==
None
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/kafka/2_test.py
test_publish
assert
string_literal
9
from propan.test import TestKafkaBroker from main import broker def test_publish(): async with TestKafkaBroker(broker) as test_broker: r = await test_broker.publish("ping", "ping", callback=True) assert r ==
"pong"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/kafka/3_conftest.py
test_publish
assert
string_literal
9
import pytest from propan.test import TestKafkaBroker from main import broker def test_publish(test_broker): r = await test_broker.publish("ping", "ping", callback=True) assert r ==
"pong"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/kafka/5_build_message.py
test_publish
assert
string_literal
8
from propan.test.kafka import build_message from main import healthcheck def test_publish(test_broker): msg = build_message("ping", "ping") assert (await healthcheck(msg)) ==
"pong"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/kafka/6_reraise.py
test_publish
pytest.raises
complex_expr
10
import pytest import pydantic from propan.test.kafka import build_message from main import healthcheck def test_publish(test_broker): msg = build_message({ "msg": "ping" }, "ping") with pytest.raises(
pydantic.ValidationError)
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/nats/2_test.py
test_publish
assert
string_literal
9
from propan.test import TestNatsBroker from main import broker def test_publish(): async with TestNatsBroker(broker) as test_broker: r = await test_broker.publish("ping", "ping", callback=True) assert r ==
"pong"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/nats/3_conftest.py
test_publish
assert
string_literal
9
import pytest from propan.test import TestNatsBroker from main import broker def test_publish(test_broker): r = await test_broker.publish("ping", "ping", callback=True) assert r ==
"pong"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/nats/5_build_message.py
test_publish
assert
string_literal
8
from propan.test.nats import build_message from main import healthcheck def test_publish(test_broker): msg = build_message("ping", "ping") assert (await healthcheck(msg)) ==
"pong"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/nats/6_reraise.py
test_publish
pytest.raises
complex_expr
10
import pytest import pydantic from propan.test.nats import build_message from main import healthcheck def test_publish(test_broker): msg = build_message({ "msg": "ping" }, "ping") with pytest.raises(
pydantic.ValidationError)
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/rabbit/2_test.py
test_publish
assert
string_literal
9
from propan.test import TestRabbitBroker from main import broker def test_publish(): async with TestRabbitBroker(broker) as test_broker: r = await test_broker.publish("ping", "ping", callback=True) assert r ==
"pong"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/rabbit/3_conftest.py
test_publish
assert
string_literal
9
import pytest from propan.test import TestRabbitBroker from main import broker def test_publish(test_broker): r = await test_broker.publish("ping", "ping", callback=True) assert r ==
"pong"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/rabbit/5_build_message.py
test_publish
assert
string_literal
8
from propan.test.rabbit import build_message from main import healthcheck def test_publish(test_broker): msg = build_message("ping", "ping") assert (await healthcheck(msg)) ==
"pong"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/rabbit/6_reraise.py
test_publish
pytest.raises
complex_expr
10
import pytest import pydantic from propan.test.rabbit import build_message from main import healthcheck def test_publish(test_broker): msg = build_message({ "msg": "ping" }, "ping") with pytest.raises(
pydantic.ValidationError)
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/redis/2_test.py
test_publish
assert
string_literal
9
from propan.test import TestRedisBroker from main import broker def test_publish(): async with TestRedisBroker(broker) as test_broker: r = await test_broker.publish("ping", "ping", callback=True) assert r ==
"pong"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/redis/3_conftest.py
test_publish
assert
string_literal
9
import pytest from propan.test import TestRedisBroker from main import broker def test_publish(test_broker): r = await test_broker.publish("ping", "ping", callback=True) assert r ==
"pong"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/redis/5_build_message.py
test_publish
assert
string_literal
8
from propan.test.redis import build_message from main import healthcheck def test_publish(test_broker): msg = build_message("ping", "ping") assert (await healthcheck(msg)) ==
"pong"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/redis/6_reraise.py
test_publish
pytest.raises
complex_expr
10
import pytest import pydantic from propan.test.redis import build_message from main import healthcheck def test_publish(test_broker): msg = build_message({ "msg": "ping" }, "ping") with pytest.raises(
pydantic.ValidationError)
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/sqs/2_test.py
test_publish
assert
string_literal
9
from propan.test import TestSQSBroker from main import broker def test_publish(): async with TestSQSBroker(broker) as test_broker: r = await test_broker.publish("ping", "ping", callback=True) assert r ==
"pong"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/sqs/3_conftest.py
test_publish
assert
string_literal
9
import pytest from propan.test import TestSQSBroker from main import broker def test_publish(test_broker): r = await test_broker.publish("ping", "ping", callback=True) assert r ==
"pong"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/sqs/5_build_message.py
test_publish
assert
string_literal
8
from propan.test.sqs import build_message from main import healthcheck def test_publish(test_broker): msg = build_message("ping", "ping") assert (await healthcheck(msg)) ==
"pong"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
docs/docs_src/quickstart/testing/sqs/6_reraise.py
test_publish
pytest.raises
complex_expr
10
import pytest import pydantic from propan.test.sqs import build_message from main import healthcheck def test_publish(test_broker): msg = build_message({ "msg": "ping" }, "ping") with pytest.raises(
pydantic.ValidationError)
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_base_arguments.py
test_base
assert
none_literal
26
from fast_depends.core import build_call_model from pydantic import BaseModel, create_model from propan._compat import SCHEMA_FIELD, ConfigDict from propan.brokers._model.schemas import BaseHandler def test_base(): def func(a: int): ... handler = BaseHandler(func, build_call_model(call=func)) me...
None
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_base_arguments.py
test_base
assert
string_literal
16
from fast_depends.core import build_call_model from pydantic import BaseModel, create_model from propan._compat import SCHEMA_FIELD, ConfigDict from propan.brokers._model.schemas import BaseHandler def test_base(): def func(a: int): ... handler = BaseHandler(func, build_call_model(call=func)) me...
"FuncMessage"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_base_arguments.py
test_response_base
assert
collection
26
from fast_depends.core import build_call_model from pydantic import BaseModel, create_model from propan._compat import SCHEMA_FIELD, ConfigDict from propan.brokers._model.schemas import BaseHandler def test_response_base(): def func() -> str: ... handler = BaseHandler(func, build_call_model(call=func...
{"title": "FuncReply", "type": "string"}
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_base_arguments.py
test_response_base
assert
collection
17
from fast_depends.core import build_call_model from pydantic import BaseModel, create_model from propan._compat import SCHEMA_FIELD, ConfigDict from propan.brokers._model.schemas import BaseHandler def test_response_base(): def func() -> str: ... handler = BaseHandler(func, build_call_model(call=func...
{ "title": "FuncPayload", "type": "null", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_base_arguments.py
test_base
assert
collection
21
from fast_depends.core import build_call_model from pydantic import BaseModel, create_model from propan._compat import SCHEMA_FIELD, ConfigDict from propan.brokers._model.schemas import BaseHandler def test_base(): def func(a: int): ... handler = BaseHandler(func, build_call_model(call=func)) me...
{ "title": "FuncPayload", "type": "integer", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_base_arguments.py
test_pydantic_gen_response_examples
assert
collection
29
from fast_depends.core import build_call_model from pydantic import BaseModel, create_model from propan._compat import SCHEMA_FIELD, ConfigDict from propan.brokers._model.schemas import BaseHandler def test_pydantic_gen_response_examples(): class Message(BaseModel): a: int def func() -> Message: ...
{ "properties": { "a": {"title": "A", "type": "integer"}, }, "required": ["a"], "title": "Message", "type": "object", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_base_arguments.py
test_pydantic_example
assert
collection
23
from fast_depends.core import build_call_model from pydantic import BaseModel, create_model from propan._compat import SCHEMA_FIELD, ConfigDict from propan.brokers._model.schemas import BaseHandler def test_pydantic_example(): Message = create_model( "Message", __config__=ConfigDict(**{SCHEMA_FIEL...
{ "example": {"a": 1}, "properties": { "a": {"title": "A", "type": "integer"}, }, "required": ["a"], "title": "Message", "type": "object", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_base_arguments.py
test_pydantic_response
assert
collection
28
from fast_depends.core import build_call_model from pydantic import BaseModel, create_model from propan._compat import SCHEMA_FIELD, ConfigDict from propan.brokers._model.schemas import BaseHandler def test_pydantic_response(): Message = create_model( "Message", __config__=ConfigDict(**{SCHEMA_FIE...
{ "examples": [{"a": 1}], "properties": { "a": {"title": "A", "type": "integer"}, }, "required": ["a"], "title": "Message", "type": "object", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_base_arguments.py
test_pydantic_args
assert
collection
26
from fast_depends.core import build_call_model from pydantic import BaseModel, create_model from propan._compat import SCHEMA_FIELD, ConfigDict from propan.brokers._model.schemas import BaseHandler def test_pydantic_args(): class Message(BaseModel): a: int b: float def func(a: Message): ...
{ "properties": { "a": {"title": "A", "type": "integer"}, "b": {"title": "B", "type": "number"}, }, "required": ["a", "b"], "title": "Message", "type": "object", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_dependencies_arguments.py
test_base
assert
none_literal
28
from fast_depends.core import build_call_model from propan import Depends from propan.brokers._model.schemas import BaseHandler def test_base(): def dep(a: int): ... def func(a=Depends(dep)): ... handler = BaseHandler(func, build_call_model(call=func)) message_title, result, respons...
None
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_dependencies_arguments.py
test_base
assert
string_literal
18
from fast_depends.core import build_call_model from propan import Depends from propan.brokers._model.schemas import BaseHandler def test_base(): def dep(a: int): ... def func(a=Depends(dep)): ... handler = BaseHandler(func, build_call_model(call=func)) message_title, result, respons...
"FuncMessage"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_dependencies_arguments.py
test_multi_args
assert
collection
29
from fast_depends.core import build_call_model from propan import Depends from propan.brokers._model.schemas import BaseHandler def test_multi_args(): def dep2(c: int): ... def dep(a: int, m=Depends(dep2)): ... def func(b: float, d=Depends(dep)): ... handler = BaseHandler(fu...
{"b", "a", "c"}
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_dependencies_arguments.py
test_base
assert
collection
23
from fast_depends.core import build_call_model from propan import Depends from propan.brokers._model.schemas import BaseHandler def test_base(): def dep(a: int): ... def func(a=Depends(dep)): ... handler = BaseHandler(func, build_call_model(call=func)) message_title, result, respons...
{ "title": "FuncPayload", "type": "integer", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_dependencies_arguments.py
test_multi_args
assert
collection
30
from fast_depends.core import build_call_model from propan import Depends from propan.brokers._model.schemas import BaseHandler def test_multi_args(): def dep2(c: int): ... def dep(a: int, m=Depends(dep2)): ... def func(b: float, d=Depends(dep)): ... handler = BaseHandler(fu...
{ "properties": { "a": {"title": "A", "type": "integer"}, "b": {"title": "B", "type": "number"}, "c": {"title": "C", "type": "integer"}, }, "title": "FuncPayload", "type": "object", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_naming.py
test_pydantic_field_rename
assert
string_literal
18
from fast_depends.core import build_call_model from pydantic import Field from propan import PropanApp, RabbitBroker from propan.brokers._model.schemas import BaseHandler from propan.cli.docs.gen import get_app_schema def test_pydantic_field_rename(): def func(a: int = Field(title="MyField", description="MyField"...
"MyField"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_naming.py
test_scheme_naming
assert
string_literal
19
from fast_depends.core import build_call_model from pydantic import Field from propan import PropanApp, RabbitBroker from propan.brokers._model.schemas import BaseHandler from propan.cli.docs.gen import get_app_schema def test_scheme_naming(): broker = RabbitBroker() app = PropanApp(broker) @broker.handl...
"Handler"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_naming.py
test_pydantic_field_rename
assert
complex_expr
17
from fast_depends.core import build_call_model from pydantic import Field from propan import PropanApp, RabbitBroker from propan.brokers._model.schemas import BaseHandler from propan.cli.docs.gen import get_app_schema def test_pydantic_field_rename(): def func(a: int = Field(title="MyField", description="MyField"...
result["title"]
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_naming.py
test_scheme_naming
assert
string_literal
20
from fast_depends.core import build_call_model from pydantic import Field from propan import PropanApp, RabbitBroker from propan.brokers._model.schemas import BaseHandler from propan.cli.docs.gen import get_app_schema def test_scheme_naming(): broker = RabbitBroker() app = PropanApp(broker) @broker.handl...
"HandlerMessage"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_naming.py
test_scheme_naming
assert
string_literal
21
from fast_depends.core import build_call_model from pydantic import Field from propan import PropanApp, RabbitBroker from propan.brokers._model.schemas import BaseHandler from propan.cli.docs.gen import get_app_schema def test_scheme_naming(): broker = RabbitBroker() app = PropanApp(broker) @broker.handl...
"PerfectArgument"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_naming.py
test_pydantic_field_rename_miltiple
assert
complex_expr
20
from fast_depends.core import build_call_model from pydantic import Field from propan import PropanApp, RabbitBroker from propan.brokers._model.schemas import BaseHandler from propan.cli.docs.gen import get_app_schema def test_pydantic_field_rename_miltiple(): def func( a: int = Field(title="AField", desc...
result["properties"]["b"]["description"]
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/handler/test_naming.py
test_pydantic_field_rename_miltiple
assert
complex_expr
25
from fast_depends.core import build_call_model from pydantic import Field from propan import PropanApp, RabbitBroker from propan.brokers._model.schemas import BaseHandler from propan.cli.docs.gen import get_app_schema def test_pydantic_field_rename_miltiple(): def func( a: int = Field(title="AField", desc...
result["properties"]["a"]["description"]
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/kafka/test_handler.py
test_base_handler
assert
collection
13
from propan import KafkaBroker, PropanApp from propan.cli.docs.gen import gen_app_schema_json def test_base_handler(): broker = KafkaBroker() @broker.handle("test") async def handler(a: int): ... schema = gen_app_schema_json(PropanApp(broker)) assert schema["channels"] ==
{ "Handler": { "bindings": {"kafka": {"bindingVersion": "0.4.0", "topic": ["test"]}}, "servers": ["dev"], "subscribe": {"message": {"$ref": "#/components/messages/HandlerMessage"}}, } }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/kafka/test_handler.py
test_group_handler
assert
collection
20
from propan import KafkaBroker, PropanApp from propan.cli.docs.gen import gen_app_schema_json def test_group_handler(): broker = KafkaBroker() @broker.handle("test", group_id="workers") async def handler(a: int) -> str: ... schema = gen_app_schema_json(PropanApp(broker)) examples = schem...
{ "Handler": { "bindings": {"kafka": {"bindingVersion": "0.4.0", "topic": ["test"]}}, "servers": ["dev"], "subscribe": { "bindings": { "kafka": { "bindingVersion": "0.4.0", "groupId": {"enum": ["workers"], "type": "string"}, "replyTo": { "title": "HandlerReply", "type": "string", }, } }, "message": {"$ref": "#/componen...
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/kafka/test_server.py
test_server_info
assert
collection
7
from propan import KafkaBroker, PropanApp from propan.cli.docs.gen import gen_app_schema_json def test_server_info(): schema = gen_app_schema_json(PropanApp(KafkaBroker())) assert schema["servers"]["dev"] ==
{ "protocol": "kafka", "url": "localhost", "protocolVersion": "auto", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/kafka/test_server.py
test_server_custom_info
assert
collection
15
from propan import KafkaBroker, PropanApp from propan.cli.docs.gen import gen_app_schema_json def test_server_custom_info(): schema = gen_app_schema_json( PropanApp( KafkaBroker( "kafka:9092", protocol="kafka-secury", api_version="1.0.0", ...
{ "protocol": "kafka-secury", "url": "kafka:9092", "protocolVersion": "1.0.0", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/nats/test_handler.py
test_base_handler
assert
collection
13
from propan import NatsBroker, PropanApp from propan.cli.docs.gen import gen_app_schema_json def test_base_handler(): broker = NatsBroker() @broker.handle("test") async def handler(a: int): ... schema = gen_app_schema_json(PropanApp(broker)) assert schema["channels"] ==
{ "Handler": { "bindings": {"nats": {"bindingVersion": "custom", "subject": "test"}}, "servers": ["dev"], "subscribe": { "bindings": {"nats": {"bindingVersion": "custom"}}, "message": {"$ref": "#/components/messages/HandlerMessage"}, }, } }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/nats/test_handler.py
test_group_handler
assert
collection
20
from propan import NatsBroker, PropanApp from propan.cli.docs.gen import gen_app_schema_json def test_group_handler(): broker = NatsBroker() @broker.handle("*test", queue="workers") async def handler(a: int) -> str: ... schema = gen_app_schema_json(PropanApp(broker)) examples = schema["c...
{ "Handler": { "bindings": { "nats": { "bindingVersion": "custom", "queue": "workers", "subject": "*test", } }, "servers": ["dev"], "subscribe": { "bindings": { "nats": { "bindingVersion": "custom", "replyTo": {"title": "HandlerReply", "type": "string"}, } }, "message": {"$ref": "#/components/messages/HandlerMessage"},...
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/nats/test_server.py
test_server_info
assert
collection
7
from propan import NatsBroker, PropanApp from propan.cli.docs.gen import gen_app_schema_json def test_server_info(): schema = gen_app_schema_json(PropanApp(NatsBroker())) assert schema["servers"]["dev"] ==
{ "protocol": "nats", "url": "nats://localhost:4222", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/rabbit/test_handler.py
test_fanout_exchange_handler
assert
collection
15
from propan import PropanApp, RabbitBroker from propan.brokers.rabbit import ExchangeType, RabbitExchange from propan.cli.docs.gen import gen_app_schema_json def test_fanout_exchange_handler(): broker = RabbitBroker() @broker.handle("test", RabbitExchange("test", type=ExchangeType.FANOUT)) async def handl...
{ "Handler": { "bindings": { "amqp": { "bindingVersion": "0.2.0", "exchange": { "autoDelete": False, "durable": False, "name": "test", "type": "fanout", "vhost": "/", }, "is": "routingKey", } }, "servers": ["dev"], "subscribe": { "bindings": {"amqp": {"ack": True, "bindingVersion": "0.2.0"}}, "description": "Test descr...
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/rabbit/test_handler.py
test_base_handler
assert
collection
15
from propan import PropanApp, RabbitBroker from propan.brokers.rabbit import ExchangeType, RabbitExchange from propan.cli.docs.gen import gen_app_schema_json def test_base_handler(): broker = RabbitBroker() @broker.handle("test") async def handler(a: int): ... schema = gen_app_schema_json(Pro...
{ "Handler": { "bindings": { "amqp": { "bindingVersion": "0.2.0", "exchange": {"type": "default", "vhost": "/"}, "is": "routingKey", "queue": { "autoDelete": False, "durable": False, "exclusive": False, "name": "test", "vhost": "/", }, } }, "servers": ["dev"], "subscribe": { "bindings": { "amqp": {"ack": True, "binding...
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/rabbit/test_server.py
test_server_custom_info
assert
collection
13
from propan import PropanApp, RabbitBroker from propan.cli.docs.gen import gen_app_schema_json def test_server_custom_info(): schema = gen_app_schema_json( PropanApp( RabbitBroker( "amqps://rabbithost.com", protocol="amqps", protocol_version="0.8.0" ) ) )...
{ "protocol": "amqps", "url": "amqps://rabbithost.com", "protocolVersion": "0.8.0", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/rabbit/test_server.py
test_server_info
assert
collection
7
from propan import PropanApp, RabbitBroker from propan.cli.docs.gen import gen_app_schema_json def test_server_info(): schema = gen_app_schema_json(PropanApp(RabbitBroker())) assert schema["servers"]["dev"] ==
{ "protocol": "amqp", "url": "amqp://guest:guest@localhost:5672/", "protocolVersion": "0.9.1", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/redis/test_handler.py
test_base_handler
assert
collection
14
from propan import PropanApp, RedisBroker from propan.cli.docs.gen import gen_app_schema_json def test_base_handler(): broker = RedisBroker() @broker.handle("test") async def handler(a: int): ... schema = gen_app_schema_json(PropanApp(broker)) assert schema["channels"] ==
{ "Handler": { "bindings": { "redis": { "bindingVersion": "custom", "channel": "test", "method": "subscribe", } }, "servers": ["dev"], "subscribe": { "bindings": {"redis": {"bindingVersion": "custom"}}, "message": {"$ref": "#/components/messages/HandlerMessage"}, }, } }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/redis/test_handler.py
test_group_handler
assert
collection
20
from propan import PropanApp, RedisBroker from propan.cli.docs.gen import gen_app_schema_json def test_group_handler(): broker = RedisBroker() @broker.handle("*test", pattern=True) async def handler(a: int) -> str: ... schema = gen_app_schema_json(PropanApp(broker)) examples = schema["ch...
{ "Handler": { "bindings": { "redis": { "bindingVersion": "custom", "channel": "*test", "method": "psubscribe", } }, "servers": ["dev"], "subscribe": { "bindings": { "redis": { "bindingVersion": "custom", "replyTo": {"title": "HandlerReply", "type": "string"}, } }, "message": {"$ref": "#/components/messages/HandlerMess...
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/redis/test_server.py
test_server_info
assert
collection
7
from propan import PropanApp, RedisBroker from propan.cli.docs.gen import gen_app_schema_json def test_server_info(): schema = gen_app_schema_json(PropanApp(RedisBroker())) assert schema["servers"]["dev"] ==
{ "protocol": "redis", "url": "redis://localhost:6379", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/sqs/test_handler.py
test_base_handler
assert
collection
14
from propan import PropanApp, SQSBroker from propan.cli.docs.gen import gen_app_schema_json def test_base_handler(): broker = SQSBroker() @broker.handle("test") async def handler(a: int): ... schema = gen_app_schema_json(PropanApp(broker)) assert schema["channels"] ==
{ "Handler": { "bindings": { "sqs": { "bindingVersion": "custom", "queue": {"fifo": False, "name": "test"}, } }, "servers": ["dev"], "subscribe": { "bindings": {"sqs": {"bindingVersion": "custom"}}, "message": {"$ref": "#/components/messages/HandlerMessage"}, }, } }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/sqs/test_handler.py
test_group_handler
assert
collection
20
from propan import PropanApp, SQSBroker from propan.cli.docs.gen import gen_app_schema_json def test_group_handler(): broker = SQSBroker() @broker.handle("test") async def handler(a: int) -> str: ... schema = gen_app_schema_json(PropanApp(broker)) examples = schema["channels"]["Handler"]...
{ "Handler": { "bindings": { "sqs": { "bindingVersion": "custom", "queue": {"fifo": False, "name": "test"}, } }, "servers": ["dev"], "subscribe": { "bindings": { "sqs": { "bindingVersion": "custom", "replyTo": {"title": "HandlerReply", "type": "string"}, } }, "message": {"$ref": "#/components/messages/HandlerMessage"},...
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/sqs/test_server.py
test_server_info
assert
collection
7
from propan import PropanApp, SQSBroker from propan.cli.docs.gen import gen_app_schema_json def test_server_info(): schema = gen_app_schema_json(PropanApp(SQSBroker())) assert schema["servers"]["dev"] ==
{ "protocol": "sqs", "url": "http://localhost:9324/", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/test_app_info.py
test_app_default_info
assert
collection
8
from propan import PropanApp, RabbitBroker from propan.asyncapi import AsyncAPIContact, AsyncAPILicense from propan.cli.docs.gen import gen_app_schema_json def test_app_default_info(): schema = gen_app_schema_json(PropanApp(RabbitBroker())) assert schema["info"] ==
{ "description": "", "title": "Propan", "version": "0.1.0", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/asyncapi/test_app_info.py
test_app_base_info
assert
collection
15
from propan import PropanApp, RabbitBroker from propan.asyncapi import AsyncAPIContact, AsyncAPILicense from propan.cli.docs.gen import gen_app_schema_json def test_app_base_info(): schema = gen_app_schema_json( PropanApp( RabbitBroker(), title="My App", description="des...
{ "description": "description", "title": "My App", "version": "1.0.0", }
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/consume.py
test_consume_double
assert
numeric_literal
32
from asyncio import Event, wait_for from unittest.mock import Mock import pytest from propan.brokers._model import BrokerAsyncUsecase class BrokerConsumeTestcase: @pytest.mark.asyncio async def test_consume_double( self, mock: Mock, queue: str, broker: BrokerAsyncUsecase, ...
2
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/publish.py
test_serialize
assert_*
variable
54
from asyncio import Event, wait_for from datetime import datetime from typing import Dict, List from unittest.mock import Mock import pytest from pydantic import BaseModel from propan.annotations import Logger from propan.brokers._model import BrokerAsyncUsecase class BrokerPublishTestcase: @pytest.mark.asyncio ...
expected_message)
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/publish.py
test_unwrap
assert_*
collection
31
from asyncio import Event, wait_for from datetime import datetime from typing import Dict, List from unittest.mock import Mock import pytest from pydantic import BaseModel from propan.annotations import Logger from propan.brokers._model import BrokerAsyncUsecase class BrokerPublishTestcase: @pytest.mark.asyncio...
{ "a": 1, "b": 1, })
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/router.py
test_router_testing
assert
string_literal
26
import pytest from propan.brokers._model import BrokerAsyncUsecase, BrokerRouter from propan.types import AnyCallable class RouterTestcase: build_message: AnyCallable async def test_router_testing( self, router: BrokerRouter, test_broker: BrokerAsyncUsecase, queue: str, ):...
"hi"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/router.py
test_empty_prefix
assert
string_literal
28
import pytest from propan.brokers._model import BrokerAsyncUsecase, BrokerRouter from propan.types import AnyCallable class RouterTestcase: build_message: AnyCallable async def test_empty_prefix( self, router: BrokerRouter, test_broker: BrokerAsyncUsecase, queue: str, ): ...
"test"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/rpc.py
test_rpc
assert
string_literal
23
import asyncio from unittest.mock import Mock import anyio import pytest from propan.brokers._model import BrokerAsyncUsecase class BrokerRPCTestcase: @pytest.mark.asyncio async def test_rpc(self, queue: str, full_broker: BrokerAsyncUsecase): @full_broker.handle(queue) async def m(): # pragm...
"1"
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/rpc.py
test_rpc_timeout_none
assert
none_literal
28
import asyncio from unittest.mock import Mock import anyio import pytest from propan.brokers._model import BrokerAsyncUsecase class BrokerRPCTestcase: @pytest.mark.asyncio async def test_rpc_timeout_none(self, queue: str, full_broker: BrokerAsyncUsecase): @full_broker.handle(queue) async def...
None
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/rpc.py
test_rpc_with_reply
assert_*
string_literal
34
import asyncio from unittest.mock import Mock import anyio import pytest from propan.brokers._model import BrokerAsyncUsecase class BrokerRPCTestcase: @pytest.mark.asyncio async def test_rpc_with_reply( self, queue: str, mock: Mock, full_broker: BrokerAsyncUsecase ): consume = asyncio.Ev...
"1")
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/rpc.py
test_rpc_with_reply_and_callback
pytest.raises
variable
14
import asyncio from unittest.mock import Mock import anyio import pytest from propan.brokers._model import BrokerAsyncUsecase class ReplyAndConsumeForbidden: @pytest.mark.asyncio async def test_rpc_with_reply_and_callback(self, full_broker: BrokerAsyncUsecase): async with full_broker: wi...
ValueError)
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/rpc.py
test_rpc_timeout_raises
pytest.raises
variable
23
import asyncio from unittest.mock import Mock import anyio import pytest from propan.brokers._model import BrokerAsyncUsecase class BrokerRPCTestcase: @pytest.mark.asyncio async def test_rpc_timeout_raises( self, queue: str, full_broker: BrokerAsyncUsecase ): @full_broker.handle(queue) ...
TimeoutError)
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/test_pushback.py
test_push_back_watcher
assert
numeric_literal
39
import pytest from propan.brokers.exceptions import SkipMessage from propan.brokers.push_back_watcher import ( FakePushBackWatcher, PushBackWatcher, WatcherContext, ) from tests.tools.marks import needs_py38 @pytest.mark.asyncio @needs_py38 async def test_push_back_watcher(async_mock): async def call_...
3
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/test_pushback.py
test_push_endless_back_watcher
assert
numeric_literal
37
import pytest from propan.brokers.exceptions import SkipMessage from propan.brokers.push_back_watcher import ( FakePushBackWatcher, PushBackWatcher, WatcherContext, ) from tests.tools.marks import needs_py38 @pytest.mark.asyncio @needs_py38 async def test_push_endless_back_watcher(async_mock): async d...
10
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/test_pushback.py
test_push_back_watcher
pytest.raises
variable
34
import pytest from propan.brokers.exceptions import SkipMessage from propan.brokers.push_back_watcher import ( FakePushBackWatcher, PushBackWatcher, WatcherContext, ) from tests.tools.marks import needs_py38 @pytest.mark.asyncio @needs_py38 async def test_push_back_watcher(async_mock): async def call_...
ValueError)
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/test_pushback.py
test_ignore_skip
pytest.raises
variable
27
import pytest from propan.brokers.exceptions import SkipMessage from propan.brokers.push_back_watcher import ( FakePushBackWatcher, PushBackWatcher, WatcherContext, ) from tests.tools.marks import needs_py38 @pytest.mark.asyncio @needs_py38 async def test_ignore_skip(async_mock): watcher = PushBackWat...
SkipMessage)
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/testclient.py
test_rpc_timeout
assert
none_literal
28
from datetime import datetime from typing import Dict, List import anyio import pytest from pydantic import BaseModel, ValidationError from propan.brokers._model import BrokerAsyncUsecase from propan.types import AnyCallable class BrokerTestclientTestcase: build_message: AnyCallable @pytest.mark.asyncio ...
None
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/testclient.py
test_rpc_timeout_raises
pytest.raises
variable
23
from datetime import datetime from typing import Dict, List import anyio import pytest from pydantic import BaseModel, ValidationError from propan.brokers._model import BrokerAsyncUsecase from propan.types import AnyCallable class BrokerTestclientTestcase: build_message: AnyCallable @pytest.mark.asyncio ...
TimeoutError)
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/testclient.py
test_serialize
assert
variable
48
from datetime import datetime from typing import Dict, List import anyio import pytest from pydantic import BaseModel, ValidationError from propan.brokers._model import BrokerAsyncUsecase from propan.types import AnyCallable class BrokerTestclientTestcase: build_message: AnyCallable @pytest.mark.asyncio ...
expected_message
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/testclient.py
test_handler_calling
pytest.raises
variable
30
from datetime import datetime from typing import Dict, List import anyio import pytest from pydantic import BaseModel, ValidationError from propan.brokers._model import BrokerAsyncUsecase from propan.types import AnyCallable class BrokerTestclientTestcase: build_message: AnyCallable @pytest.mark.asyncio ...
ValidationError)
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/base/testclient.py
test_handler_calling
assert
func_call
26
from datetime import datetime from typing import Dict, List import anyio import pytest from pydantic import BaseModel, ValidationError from propan.brokers._model import BrokerAsyncUsecase from propan.types import AnyCallable class BrokerTestclientTestcase: build_message: AnyCallable @pytest.mark.asyncio ...
await handler(message)
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/rabbit/test_custom_decode.py
test_global
assert
numeric_literal
33
from unittest.mock import Mock import pytest from propan import RabbitBroker from propan.test import TestRabbitBroker from propan.test.rabbit import build_message @pytest.mark.asyncio async def test_global(mock: Mock): async def custom_decode(msg, original): mock.decode() return await original(ms...
1
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/rabbit/test_declare.py
test_declare_queue
assert
variable
19
import pytest from propan.brokers.rabbit import RabbitBroker, RabbitExchange, RabbitQueue from tests.tools.marks import needs_py38 @needs_py38 @pytest.mark.asyncio async def test_declare_queue( broker: RabbitBroker, async_mock, mock, monkeypatch: pytest.MonkeyPatch, queue: str ): with monkeypatch.context(): ...
q2
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/rabbit/test_depends.py
test_broker_depends
assert
bool_literal
39
import aio_pika import pytest from propan.annotations import RabbitMessage from propan.brokers.rabbit import RabbitBroker from propan.utils import Depends @pytest.mark.asyncio @pytest.mark.rabbit async def test_broker_depends( queue, full_broker: RabbitBroker, ): def sync_depends(message: RabbitMessage): ...
True
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/rabbit/test_depends.py
test_different_consumers_has_different_messages
assert
none_literal
38
import aio_pika import pytest from propan.annotations import RabbitMessage from propan.brokers.rabbit import RabbitBroker from propan.utils import Depends @pytest.mark.asyncio @pytest.mark.rabbit async def test_different_consumers_has_different_messages( context, full_broker: RabbitBroker, ): message1 = N...
None
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/rabbit/test_depends.py
test_different_consumers_has_different_messages
assert
variable
37
import aio_pika import pytest from propan.annotations import RabbitMessage from propan.brokers.rabbit import RabbitBroker from propan.utils import Depends @pytest.mark.asyncio @pytest.mark.rabbit async def test_different_consumers_has_different_messages( context, full_broker: RabbitBroker, ): message1 = N...
message2
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor
Lancetnik/Propan
49536cddc2dcf5216925fcaa750671623a12d0f2
66
train
train
tests/brokers/rabbit/test_init.py
test_set_max
assert
numeric_literal
11
import pytest from propan.brokers.rabbit import RabbitBroker @pytest.mark.asyncio @pytest.mark.rabbit async def test_set_max(): broker = RabbitBroker(logger=None, consumers=10) await broker.start() assert broker._channel._prefetch_count ==
10
49536cddc2dcf5216925fcaa750671623a12d0f2
66
v2_extractor_at_anchor