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
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/controller/tests/test_task.py
test_get_files
assert
numeric_literal
97
import os import uuid import tempfile import platform from io import open, TextIOWrapper from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.environment.environment import EnvironmentController from datmo.core.controller.task import TaskController from...
2
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/storage/driver/tests/test_blitzdb_dal_driver.py
test_db_set_multiple_objs
assert
numeric_literal
50
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import datetime import platform from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.util.exceptions import EntityNotFound, InvalidArgumentType, ...
4
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/storage/driver/tests/test_blitzdb_dal_driver.py
test_db_query
assert
numeric_literal
36
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import datetime import platform from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.util.exceptions import EntityNotFound, InvalidArgumentType, ...
3
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/storage/driver/tests/test_blitzdb_dal_driver.py
test_db_query_all
assert
numeric_literal
35
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import datetime import platform from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.util.exceptions import EntityNotFound, InvalidArgumentType, ...
9
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/storage/driver/tests/test_blitzdb_dal_driver.py
test_db_wildcard_query
assert
numeric_literal
39
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import datetime import platform from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.util.exceptions import EntityNotFound, InvalidArgumentType, ...
1
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/storage/driver/tests/test_blitzdb_dal_driver.py
test_query_gte_int
assert
numeric_literal
40
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import datetime import platform from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.util.exceptions import EntityNotFound, InvalidArgumentType, ...
2
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/storage/local/tests/test_dal_code.py
test_query_codes
assert
numeric_literal
43
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.c...
1
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/storage/local/tests/test_dal_code.py
test_query_codes_range_query
assert
numeric_literal
51
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.c...
3
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/storage/local/tests/test_dal_environment.py
test_query_environments_basic
assert
numeric_literal
50
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.c...
1
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/storage/local/tests/test_dal_environment.py
test_query_environments_multiple
assert
numeric_literal
56
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.c...
3
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/storage/local/tests/test_dal_file_collection.py
test_query_file_collections_basic
assert
numeric_literal
45
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.c...
1
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/storage/local/tests/test_dal_file_collection.py
test_query_file_collections_multiple
assert
numeric_literal
51
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.c...
3
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/storage/local/tests/test_dal_model.py
test_query_models_basic
assert
numeric_literal
37
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import shutil import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalD...
1
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/storage/local/tests/test_dal_model.py
test_query_models_basic
assert
numeric_literal
39
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import shutil import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalD...
2
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/storage/local/tests/test_dal_model.py
test_query_models_multiple
assert
numeric_literal
43
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import shutil import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalD...
3
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/storage/local/tests/test_dal_session.py
test_query_sessions
assert
numeric_literal
43
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.c...
1
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/storage/local/tests/test_dal_session.py
test_query_sessions
assert
numeric_literal
45
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import platform from datetime import datetime from datmo.core.storage.driver.blitzdb_dal_driver import BlitzDBDALDriver from datmo.core.storage.local.dal import LocalDAL from datmo.c...
2
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/cli/command/tests/test_task.py
test_task_ls
assert
collection
59
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import glob import time import tempfile import platform from argparse import ArgumentError from io import open from datmo.config import Config from datmo.cli.driver.helper import Helper from datmo....
[]
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/controller/code/driver/tests/test_file.py
test_list_refs
assert
collection
57
from __future__ import division from __future__ import unicode_literals import os import time import shutil import tempfile import platform from io import open from datmo.core.controller.code.driver.file import FileCodeDriver from datmo.core.util.misc_functions import list_all_filepaths from datmo.core.util.exception...
[]
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/controller/tests/test_snapshot.py
test_create_no_environment_detected_in_file
assert
collection
55
import os import tempfile import platform from io import open, TextIOWrapper from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.environment.environment import EnvironmentController from datmo.core.controller.task import TaskController from datmo.core....
{}
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/controller/tests/test_snapshot_private.py
test_config_setup_with_empty_no_file
assert
collection
54
import os import tempfile import platform from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.snapshot import SnapshotController from datmo.core.util.exceptions import CommitDoesNotExist class TestSnapshotController(): def setup_method(self): ...
{}
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/util/tests/test_json_store.py
test_load_new_json_file
assert
collection
33
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import tempfile import platform import os from io import open from datmo.core.util.json_store import JSONStore from datmo.core.util.exceptions import FileIOError class TestJSONStore(): def setup_class(se...
{}
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/tests/test_snapshot.py
test_create
assert
collection
74
import os import tempfile import platform from io import open, TextIOWrapper from datmo.snapshot import create, ls, update, delete from datmo.config import Config from datmo.snapshot import Snapshot from datmo.task import run from datmo.core.entity.snapshot import Snapshot as CoreSnapshot from datmo.core.controller.pr...
[]
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/tests/test_snapshot.py
test_create
assert
collection
75
import os import tempfile import platform from io import open, TextIOWrapper from datmo.snapshot import create, ls, update, delete from datmo.config import Config from datmo.snapshot import Snapshot from datmo.task import run from datmo.core.entity.snapshot import Snapshot as CoreSnapshot from datmo.core.controller.pr...
{}
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/controller/code/driver/tests/test_file.py
test_tracked_files
assert
collection
50
from __future__ import division from __future__ import unicode_literals import os import time import shutil import tempfile import platform from io import open from datmo.core.controller.code.driver.file import FileCodeDriver from datmo.core.util.misc_functions import list_all_filepaths from datmo.core.util.exception...
["test.txt"]
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/cli/command/tests/test_task.py
test_task_stop_success
assert
bool_literal
79
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import glob import time import tempfile import platform from argparse import ArgumentError from io import open from datmo.config import Config from datmo.cli.driver.helper import Helper from datmo....
True
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/cli/command/tests/test_workspace.py
test_notebook
assert
bool_literal
65
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import platform import timeout_decorator from datmo.config import Config from datmo.cli.driver.helper import Helper from datmo.cli.command.project import ProjectCommand from datmo.cl...
True
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/cli/driver/tests/test_helper.py
test_prompt_bool
assert
bool_literal
49
from __future__ import division from __future__ import print_function from __future__ import unicode_literals from future import standard_library standard_library.install_aliases() from builtins import input import os import sys import tempfile import platform from datmo.cli.driver.helper import Helper from datmo.cor...
True
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/controller/code/driver/tests/test_file.py
test_is_initalized
assert
bool_literal
33
from __future__ import division from __future__ import unicode_literals import os import time import shutil import tempfile import platform from io import open from datmo.core.controller.code.driver.file import FileCodeDriver from datmo.core.util.misc_functions import list_all_filepaths from datmo.core.util.exception...
True
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/controller/code/driver/tests/test_git.py
test_is_initialized
assert
bool_literal
36
from __future__ import division from __future__ import unicode_literals import os import time import shutil import tempfile import platform from io import open from datmo.core.controller.code.driver.git import (GitCodeDriver, GitHostDriver) from datmo.core.util.excep...
True
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/controller/environment/driver/tests/test_dockerenv.py
test_build
assert
bool_literal
46
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import platform import uuid import timeout_decorator from io import open from datmo.core.controller.environment.driver.dockerenv import DockerEnvironmentDriver from datmo.core.util.e...
True
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/controller/file/driver/tests/test_local.py
test_is_initialized
assert
bool_literal
35
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import shutil import tempfile import platform from io import TextIOWrapper from datmo.core.util.misc_functions import get_datmo_temp_path from datmo.core.controller.file.driver.local import LocalFil...
True
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/controller/tests/test_base.py
test_current_session
assert
bool_literal
59
from __future__ import division from __future__ import unicode_literals import os import tempfile import platform from datmo.config import Config from datmo.core.controller.base import BaseController from datmo.core.controller.code.driver.file import FileCodeDriver from datmo.core.controller.file.driver.local import ...
True
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/controller/tests/test_project.py
test_init_reinit_success
assert
bool_literal
49
from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import tempfile import platform import time import timeout_decorator from io import open from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.c...
True
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
datmo/datmo
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
train
train
datmo/core/controller/tests/test_session.py
test_select
assert
bool_literal
35
import os import shutil import tempfile import platform from datmo.config import Config from datmo.core.controller.project import ProjectController from datmo.core.controller.session import SessionController from datmo.core.util.exceptions import InvalidArgumentType, ProjectNotInitialized, InvalidProjectPath, SessionD...
True
fbb20e3ef5b6fc085c4c59a3aea6404cfb6959cb
88
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_async.py
test_all_handlers_to_updates_are_overwritten_in_async
assert
variable
168
import asyncio import inspect import pytest from pywa import WhatsApp as WhatsAppSync from pywa.handlers import _HandlerDecorators from pywa.types.base_update import BaseUpdate from pywa_async import WhatsApp as WhatsAppAsync from pywa.api import GraphAPI as GraphAPISync from pywa_async.api import GraphAPIAsync from ...
update
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_async.py
_check_docs
assert
variable
147
import asyncio import inspect import pytest from pywa import WhatsApp as WhatsAppSync from pywa.handlers import _HandlerDecorators from pywa.types.base_update import BaseUpdate from pywa_async import WhatsApp as WhatsAppAsync from pywa.api import GraphAPI as GraphAPISync from pywa_async.api import GraphAPIAsync from ...
async_doc
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_async.py
test_same_signature
assert
variable
182
import asyncio import inspect import pytest from pywa import WhatsApp as WhatsAppSync from pywa.handlers import _HandlerDecorators from pywa.types.base_update import BaseUpdate from pywa_async import WhatsApp as WhatsAppAsync from pywa.api import GraphAPI as GraphAPISync from pywa_async.api import GraphAPIAsync from ...
async_sig
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_async.py
test_all_methods_are_overwritten_in_async
assert
variable
213
import asyncio import inspect import pytest from pywa import WhatsApp as WhatsAppSync from pywa.handlers import _HandlerDecorators from pywa.types.base_update import BaseUpdate from pywa_async import WhatsApp as WhatsAppAsync from pywa.api import GraphAPI as GraphAPISync from pywa_async.api import GraphAPIAsync from ...
async_method
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_async.py
test_same_signature
assert
complex_expr
170
import asyncio import inspect import pytest from pywa import WhatsApp as WhatsAppSync from pywa.handlers import _HandlerDecorators from pywa.types.base_update import BaseUpdate from pywa_async import WhatsApp as WhatsAppAsync from pywa.api import GraphAPI as GraphAPISync from pywa_async.api import GraphAPIAsync from ...
async_sig.parameters
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_async.py
test_same_return_annotation
assert
complex_expr
153
import asyncio import inspect import pytest from pywa import WhatsApp as WhatsAppSync from pywa.handlers import _HandlerDecorators from pywa.types.base_update import BaseUpdate from pywa_async import WhatsApp as WhatsAppAsync from pywa.api import GraphAPI as GraphAPISync from pywa_async.api import GraphAPIAsync from ...
async_sig.return_annotation
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_async.py
test_all_handlers_to_updates_are_overwritten_in_async
assert
func_call
162
import asyncio import inspect import pytest from pywa import WhatsApp as WhatsAppSync from pywa.handlers import _HandlerDecorators from pywa.types.base_update import BaseUpdate from pywa_async import WhatsApp as WhatsAppAsync from pywa.api import GraphAPI as GraphAPISync from pywa_async.api import GraphAPIAsync from ...
len( WhatsAppAsync._handlers_to_updates )
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_callback_data.py
test_callback_class_not_empty
pytest.raises
variable
10
import dataclasses import pytest from pywa.types import CallbackData def test_callback_class_not_empty(): """Test if the callback data is empty.""" with pytest.raises(
TypeError)
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_callback_data.py
test_data
pytest.raises
variable
23
import dataclasses import pytest from pywa.types import CallbackData def test_data(): """Test the callback data.""" @dataclasses.dataclass(slots=True, frozen=True) class User(CallbackData): __callback_id__ = "x" id: int name: str is_admin: bool assert User(id=1234, n...
ValueError)
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_callback_data.py
test_data
assert
string_literal
19
import dataclasses import pytest from pywa.types import CallbackData def test_data(): """Test the callback data.""" @dataclasses.dataclass(slots=True, frozen=True) class User(CallbackData): __callback_id__ = "x" id: int name: str is_admin: bool assert User(id=1234, n...
"x~3456~yyy~"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_callback_data.py
test_data_sep
assert
string_literal
20
import dataclasses import pytest from pywa.types import CallbackData def test_data_sep(): """Test the data separator override.""" @dataclasses.dataclass(slots=True, frozen=True) class User(CallbackData): __callback_id__ = "x" __callback_data_sep__ = "*" id: int name: str ...
"x*3456*yyy*"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_callback_data.py
test_data
assert
string_literal
18
import dataclasses import pytest from pywa.types import CallbackData def test_data(): """Test the callback data.""" @dataclasses.dataclass(slots=True, frozen=True) class User(CallbackData): __callback_id__ = "x" id: int name: str is_admin: bool assert User(id=1234, ...
"x~1234~xxx~§"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_callback_data.py
test_data_sep
assert
string_literal
19
import dataclasses import pytest from pywa.types import CallbackData def test_data_sep(): """Test the data separator override.""" @dataclasses.dataclass(slots=True, frozen=True) class User(CallbackData): __callback_id__ = "x" __callback_data_sep__ = "*" id: int name: str ...
"x*1234*xxx*§"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_callback_data.py
test_callback_class_uniqueness
assert
complex_expr
22
import dataclasses import pytest from pywa.types import CallbackData def test_callback_class_uniqueness(): """Test the uniqueness of the callback data.""" @dataclasses.dataclass(slots=True, frozen=True) class User(CallbackData): id: str name: str is_admin: bool @dataclasses....
Group.__callback_id__
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_client.py
test_token
assert
variable
33
import dataclasses import json import datetime import tempfile from platform import system import pytest from pywa import WhatsApp, types, utils, _helpers as helpers, filters from pywa.types import Contact from pywa.types.media import Media PHONE_ID = "123456789" TOKEN = "xyz" WABA_ID = "987654321" MSG_ID = "wamid.x...
TOKEN
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_client.py
test_token
assert
string_literal
35
import dataclasses import json import datetime import tempfile from platform import system import pytest from pywa import WhatsApp, types, utils, _helpers as helpers, filters from pywa.types import Contact from pywa.types.media import Media PHONE_ID = "123456789" TOKEN = "xyz" WABA_ID = "987654321" MSG_ID = "wamid.x...
"abc"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_client.py
test_resolve_waba_id_param
assert
variable
35
import dataclasses import json import datetime import tempfile from platform import system import pytest from pywa import WhatsApp, types, utils, _helpers as helpers, filters from pywa.types import Contact from pywa.types.media import Media PHONE_ID = "123456789" TOKEN = "xyz" WABA_ID = "987654321" MSG_ID = "wamid.x...
WABA_ID
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_client.py
test_resolve_phone_id_param
assert
variable
35
import dataclasses import json import datetime import tempfile from platform import system import pytest from pywa import WhatsApp, types, utils, _helpers as helpers, filters from pywa.types import Contact from pywa.types.media import Media PHONE_ID = "123456789" TOKEN = "xyz" WABA_ID = "987654321" MSG_ID = "wamid.x...
PHONE_ID
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_client.py
test_resolve_waba_id_param
assert
string_literal
44
import dataclasses import json import datetime import tempfile from platform import system import pytest from pywa import WhatsApp, types, utils, _helpers as helpers, filters from pywa.types import Contact from pywa.types.media import Media PHONE_ID = "123456789" TOKEN = "xyz" WABA_ID = "987654321" MSG_ID = "wamid.x...
"987654321"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_client.py
test_resolve_waba_id_param
pytest.raises
variable
54
import dataclasses import json import datetime import tempfile from platform import system import pytest from pywa import WhatsApp, types, utils, _helpers as helpers, filters from pywa.types import Contact from pywa.types.media import Media PHONE_ID = "123456789" TOKEN = "xyz" WABA_ID = "987654321" MSG_ID = "wamid.x...
ValueError)
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_client.py
test_resolve_phone_id_param
assert
string_literal
41
import dataclasses import json import datetime import tempfile from platform import system import pytest from pywa import WhatsApp, types, utils, _helpers as helpers, filters from pywa.types import Contact from pywa.types.media import Media PHONE_ID = "123456789" TOKEN = "xyz" WABA_ID = "987654321" MSG_ID = "wamid.x...
"1234567890"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_client.py
test_token
assert
string_literal
36
import dataclasses import json import datetime import tempfile from platform import system import pytest from pywa import WhatsApp, types, utils, _helpers as helpers, filters from pywa.types import Contact from pywa.types.media import Media PHONE_ID = "123456789" TOKEN = "xyz" WABA_ID = "987654321" MSG_ID = "wamid.x...
"Bearer abc"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_client.py
test_resolve_callback_data
assert
string_literal
40
import dataclasses import json import datetime import tempfile from platform import system import pytest from pywa import WhatsApp, types, utils, _helpers as helpers, filters from pywa.types import Contact from pywa.types.media import Media PHONE_ID = "123456789" TOKEN = "xyz" WABA_ID = "987654321" MSG_ID = "wamid.x...
"user:123:John"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_errors.py
test_error_codes
assert
complex_expr
36
from pywa import errors exceptions: dict[type[errors.WhatsAppError], dict] = { errors.MediaUploadError: { "code": 131053, "title": "Media upload error", "message": "Media upload error", "error_data": { "details": "Downloading media from weblink failed with http code 429,...
data["code"]
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_errors.py
test_error_codes
assert
complex_expr
39
from pywa import errors exceptions: dict[type[errors.WhatsAppError], dict] = { errors.MediaUploadError: { "code": 131053, "title": "Media upload error", "message": "Media upload error", "error_data": { "details": "Downloading media from weblink failed with http code 429,...
data["message"]
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_errors.py
test_error_codes
assert
func_call
38
from pywa import errors exceptions: dict[type[errors.WhatsAppError], dict] = { errors.MediaUploadError: { "code": 131053, "title": "Media upload error", "message": "Media upload error", "error_data": { "details": "Downloading media from weblink failed with http code 429,...
data.get("type")
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_errors.py
test_error_codes
assert
func_call
42
from pywa import errors exceptions: dict[type[errors.WhatsAppError], dict] = { errors.MediaUploadError: { "code": 131053, "title": "Media upload error", "message": "Media upload error", "error_data": { "details": "Downloading media from weblink failed with http code 429,...
data.get("href")
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_errors.py
test_error_codes
assert
func_call
41
from pywa import errors exceptions: dict[type[errors.WhatsAppError], dict] = { errors.MediaUploadError: { "code": 131053, "title": "Media upload error", "message": "Media upload error", "error_data": { "details": "Downloading media from weblink failed with http code 429,...
data.get("fbtrace_id")
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_flows.py
test_flow_callback_wrapper_on_error
assert
variable
81
import dataclasses import datetime import importlib import json import pathlib from typing import Callable import pytest from pywa import WhatsApp, handlers, utils, filters from pywa.handlers import FlowCompletionHandler from pywa.types.flows import ( FlowJSON, Screen, Layout, Form, TextInput, ...
on_error
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_flows.py
test_flow_response_with_close_flow
assert
string_literal
45
import dataclasses import datetime import importlib import json import pathlib from typing import Callable import pytest from pywa import WhatsApp, handlers, utils, filters from pywa.handlers import FlowCompletionHandler from pywa.types.flows import ( FlowJSON, Screen, Layout, Form, TextInput, ...
"SUCCESS"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_flows.py
test_flow_response_with_close_flow
pytest.raises
variable
55
import dataclasses import datetime import importlib import json import pathlib from typing import Callable import pytest from pywa import WhatsApp, handlers, utils, filters from pywa.handlers import FlowCompletionHandler from pywa.types.flows import ( FlowJSON, Screen, Layout, Form, TextInput, ...
ValueError)
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_flows.py
test_flow_callback_wrapper_main_handler
assert
variable
71
import dataclasses import datetime import importlib import json import pathlib from typing import Callable import pytest from pywa import WhatsApp, handlers, utils, filters from pywa.handlers import FlowCompletionHandler from pywa.types.flows import ( FlowJSON, Screen, Layout, Form, TextInput, ...
main_handler
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_flows.py
test_flows_to_json
assert
variable
55
import dataclasses import datetime import importlib import json import pathlib from typing import Callable import pytest from pywa import WhatsApp, handlers, utils, filters from pywa.handlers import FlowCompletionHandler from pywa.types.flows import ( FlowJSON, Screen, Layout, Form, TextInput, ...
example_dict
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_flows.py
test_ref_to_str_without_screen
assert
string_literal
42
import dataclasses import datetime import importlib import json import pathlib from typing import Callable import pytest from pywa import WhatsApp, handlers, utils, filters from pywa.handlers import FlowCompletionHandler from pywa.types.flows import ( FlowJSON, Screen, Layout, Form, TextInput, ...
"${data.age}"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_flows.py
test_flow_callback_wrapper_on_completion
assert
variable
73
import dataclasses import datetime import importlib import json import pathlib from typing import Callable import pytest from pywa import WhatsApp, handlers, utils, filters from pywa.handlers import FlowCompletionHandler from pywa.types.flows import ( FlowJSON, Screen, Layout, Form, TextInput, ...
on_completion
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_flows.py
test_component_ref
assert
string_literal
41
import dataclasses import datetime import importlib import json import pathlib from typing import Callable import pytest from pywa import WhatsApp, handlers, utils, filters from pywa.handlers import FlowCompletionHandler from pywa.types.flows import ( FlowJSON, Screen, Layout, Form, TextInput, ...
"${form.test}"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_flows.py
test_screen_data_ref
assert
string_literal
41
import dataclasses import datetime import importlib import json import pathlib from typing import Callable import pytest from pywa import WhatsApp, handlers, utils, filters from pywa.handlers import FlowCompletionHandler from pywa.types.flows import ( FlowJSON, Screen, Layout, Form, TextInput, ...
"${data.test}"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_flows.py
test_invert_condition
assert
string_literal
43
import dataclasses import datetime import importlib import json import pathlib from typing import Callable import pytest from pywa import WhatsApp, handlers, utils, filters from pywa.handlers import FlowCompletionHandler from pywa.types.flows import ( FlowJSON, Screen, Layout, Form, TextInput, ...
"`!${data.age}`"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_flows.py
test_encoder_py_to_json_types
assert
collection
46
import dataclasses import datetime import importlib import json import pathlib from typing import Callable import pytest from pywa import WhatsApp, handlers, utils, filters from pywa.handlers import FlowCompletionHandler from pywa.types.flows import ( FlowJSON, Screen, Layout, Form, TextInput, ...
{"type": "string"}
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_flows.py
test_encoder_py_to_json_types
assert
collection
47
import dataclasses import datetime import importlib import json import pathlib from typing import Callable import pytest from pywa import WhatsApp, handlers, utils, filters from pywa.handlers import FlowCompletionHandler from pywa.types.flows import ( FlowJSON, Screen, Layout, Form, TextInput, ...
{"type": "number"}
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_handlers.py
test_all_combinations
assert
numeric_literal
53
import datetime import functools from types import ModuleType import pytest from pywa import handlers, types, WhatsApp, filters from pywa.handlers import FlowRequestHandler, _flow_request_handler_attr from pywa.types import Message from pywa_async import WhatsApp as WhatsAppAsync FAKE_WA = WhatsApp(phone_id="1234567...
5
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_handlers.py
test_add_handlers
assert
variable
47
import datetime import functools from types import ModuleType import pytest from pywa import handlers, types, WhatsApp, filters from pywa.handlers import FlowRequestHandler, _flow_request_handler_attr from pywa.types import Message from pywa_async import WhatsApp as WhatsAppAsync FAKE_WA = WhatsApp(phone_id="1234567...
h
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_handlers.py
test_get_flow_request_handler
assert
variable
46
import datetime import functools from types import ModuleType import pytest from pywa import handlers, types, WhatsApp, filters from pywa.handlers import FlowRequestHandler, _flow_request_handler_attr from pywa.types import Message from pywa_async import WhatsApp as WhatsAppAsync FAKE_WA = WhatsApp(phone_id="1234567...
c
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_handlers.py
test_remove_handlers
assert
collection
48
import datetime import functools from types import ModuleType import pytest from pywa import handlers, types, WhatsApp, filters from pywa.handlers import FlowRequestHandler, _flow_request_handler_attr from pywa.types import Message from pywa_async import WhatsApp as WhatsAppAsync FAKE_WA = WhatsApp(phone_id="1234567...
[]
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_handlers.py
test_shared_data
assert
string_literal
77
import datetime import functools from types import ModuleType import pytest from pywa import handlers, types, WhatsApp, filters from pywa.handlers import FlowRequestHandler, _flow_request_handler_attr from pywa.types import Message from pywa_async import WhatsApp as WhatsAppAsync FAKE_WA = WhatsApp(phone_id="1234567...
"value"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_handlers.py
test_get_flow_request_handler
assert
variable
51
import datetime import functools from types import ModuleType import pytest from pywa import handlers, types, WhatsApp, filters from pywa.handlers import FlowRequestHandler, _flow_request_handler_attr from pywa.types import Message from pywa_async import WhatsApp as WhatsAppAsync FAKE_WA = WhatsApp(phone_id="1234567...
callback
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_handlers.py
test_remove_handlers
pytest.raises
variable
50
import datetime import functools from types import ModuleType import pytest from pywa import handlers, types, WhatsApp, filters from pywa.handlers import FlowRequestHandler, _flow_request_handler_attr from pywa.types import Message from pywa_async import WhatsApp as WhatsAppAsync FAKE_WA = WhatsApp(phone_id="1234567...
ValueError)
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_handlers.py
test_instance_with_parentheses
assert
variable
46
import datetime import functools from types import ModuleType import pytest from pywa import handlers, types, WhatsApp, filters from pywa.handlers import FlowRequestHandler, _flow_request_handler_attr from pywa.types import Message from pywa_async import WhatsApp as WhatsAppAsync FAKE_WA = WhatsApp(phone_id="1234567...
instance_with_parentheses
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_handlers.py
test_class_with_parentheses_kw
assert
variable
48
import datetime import functools from types import ModuleType import pytest from pywa import handlers, types, WhatsApp, filters from pywa.handlers import FlowRequestHandler, _flow_request_handler_attr from pywa.types import Message from pywa_async import WhatsApp as WhatsAppAsync FAKE_WA = WhatsApp(phone_id="1234567...
class_with_parentheses_kw
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_handlers.py
test_class_without_parentheses
assert
variable
48
import datetime import functools from types import ModuleType import pytest from pywa import handlers, types, WhatsApp, filters from pywa.handlers import FlowRequestHandler, _flow_request_handler_attr from pywa.types import Message from pywa_async import WhatsApp as WhatsAppAsync FAKE_WA = WhatsApp(phone_id="1234567...
class_without_parentheses
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_handlers.py
test_class_with_parentheses_args
assert
variable
48
import datetime import functools from types import ModuleType import pytest from pywa import handlers, types, WhatsApp, filters from pywa.handlers import FlowRequestHandler, _flow_request_handler_attr from pywa.types import Message from pywa_async import WhatsApp as WhatsAppAsync FAKE_WA = WhatsApp(phone_id="1234567...
class_with_parentheses_args
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_handlers.py
test_instance_without_parentheses
assert
variable
46
import datetime import functools from types import ModuleType import pytest from pywa import handlers, types, WhatsApp, filters from pywa.handlers import FlowRequestHandler, _flow_request_handler_attr from pywa.types import Message from pywa_async import WhatsApp as WhatsAppAsync FAKE_WA = WhatsApp(phone_id="1234567...
instance_without_parentheses
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_listeners.py
test_listener_stopped_sync
assert
string_literal
35
import asyncio import pytest import threading import time from pywa import WhatsApp as WhatsAppSync, filters from pywa_async import WhatsApp as WhatsAppAsync from pywa.listeners import ( ListenerTimeout, ListenerCanceled, ListenerStopped, UserUpdateListenerIdentifier, ) def wa_sync(): return What...
"manual"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_listeners.py
test_listener_stopped_sync
pytest.raises
variable
31
import asyncio import pytest import threading import time from pywa import WhatsApp as WhatsAppSync, filters from pywa_async import WhatsApp as WhatsAppAsync from pywa.listeners import ( ListenerTimeout, ListenerCanceled, ListenerStopped, UserUpdateListenerIdentifier, ) def wa_sync(): return What...
ListenerStopped)
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_listeners.py
test_listener_timeout_sync
pytest.raises
variable
25
import asyncio import pytest import threading import time from pywa import WhatsApp as WhatsAppSync, filters from pywa_async import WhatsApp as WhatsAppAsync from pywa.listeners import ( ListenerTimeout, ListenerCanceled, ListenerStopped, UserUpdateListenerIdentifier, ) def wa_sync(): return What...
ListenerTimeout)
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_listeners.py
test_listener_canceled_sync
pytest.raises
variable
32
import asyncio import pytest import threading import time from pywa import WhatsApp as WhatsAppSync, filters from pywa_async import WhatsApp as WhatsAppAsync from pywa.listeners import ( ListenerTimeout, ListenerCanceled, ListenerStopped, UserUpdateListenerIdentifier, ) def wa_sync(): return What...
ListenerCanceled)
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_server.py
test_invoke_callbacks_calls_all_handlers
assert_*
variable
42
import pytest from unittest.mock import Mock from pywa import utils as pywa_utils from pywa.server import Server, StopHandling, ContinueHandling def mock_handler(mocker): handler = mocker.Mock() handler.handle = mocker.Mock() return handler def mock_update(mocker): return mocker.Mock() def server_wi...
mock_update)
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_server.py
test_default_flow_request_decryptor_encryptor
assert
string_literal
29
import pytest from unittest.mock import Mock from pywa import utils as pywa_utils from pywa.server import Server, StopHandling, ContinueHandling def test_default_flow_request_decryptor_encryptor(): payload = { "encrypted_flow_data": "sCTmBCqjs0GkkX6n/nyZDuyjpaijuelY3I/8rlr1ZIEymEzCMnDGQdxQ9OGaKw0CEaWSgc/G...
"FBEoV73B8mnSt+nzfurVK704zkwHsr1uu/m953h5vNdri5G4Pe/BoDTh6SgzgjrrZ4iP12GO3kti8YW7Tn1KibKaRf8LE/gps2ATJq3nWSCI"
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_server.py
test_default_flow_request_decryptor_encryptor
assert
collection
21
import pytest from unittest.mock import Mock from pywa import utils as pywa_utils from pywa.server import Server, StopHandling, ContinueHandling def test_default_flow_request_decryptor_encryptor(): payload = { "encrypted_flow_data": "sCTmBCqjs0GkkX6n/nyZDuyjpaijuelY3I/8rlr1ZIEymEzCMnDGQdxQ9OGaKw0CEaWSgc/G...
{ "data": {}, "flow_token": "my_flow_token", "screen": "", "action": "INIT", "version": "3.0", }
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_templates.py
test_media_header_handle_reset
assert
none_literal
17
import datetime import pytest from pywa import types from pywa.types import flows from pywa.types.templates import * # noqa: F403 import importlib import json import pathlib def test_media_header_handle_reset(): media_header = HeaderImage(example="https://example.com/image.jpg") media_header._handle = "1:ha...
None
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_templates.py
test_template_text_examples_params
pytest.raises
variable
14
import datetime import pytest from pywa import types from pywa.types import flows from pywa.types.templates import * # noqa: F403 import importlib import json import pathlib def test_template_text_examples_params(): with pytest.raises(
ValueError)
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_templates.py
test_template_text_examples_positionals
assert
collection
28
import datetime import pytest from pywa import types from pywa.types import flows from pywa.types.templates import * # noqa: F403 import importlib import json import pathlib def test_template_text_examples_positionals(): h = HeaderText( "Hi {{1}}, this is a text template number {{2}}", "David", ...
("David", 1)
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_templates.py
test_templates_to_json
assert
variable
26
import datetime import pytest from pywa import types from pywa.types import flows from pywa.types.templates import * # noqa: F403 import importlib import json import pathlib def test_templates_to_json(caplog): for templates_dir in pathlib.Path("tests/data/templates").iterdir(): with open( pa...
example_dict
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_templates.py
test_template_text_examples_named
assert
complex_expr
39
import datetime import pytest from pywa import types from pywa.types import flows from pywa.types.templates import * # noqa: F403 import importlib import json import pathlib def test_template_text_examples_named(): b = BodyText( "Hi {{name}}, this is a text template number {{number}}", name="Dav...
ParamFormat.NAMED
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor
david-lev/pywa
9405a74ad206e13169868c0676de53148db06f3a
59
train
train
tests/test_templates.py
test_template_text_examples_positionals
assert
complex_expr
37
import datetime import pytest from pywa import types from pywa.types import flows from pywa.types.templates import * # noqa: F403 import importlib import json import pathlib def test_template_text_examples_positionals(): h = HeaderText( "Hi {{1}}, this is a text template number {{2}}", "David", ...
ParamFormat.POSITIONAL
9405a74ad206e13169868c0676de53148db06f3a
59
v2_extractor_at_anchor