MCPcopy Index your code
hub / github.com/python-telegram-bot/python-telegram-bot / user

Function user

tests/test_user.py:55–77  ·  view source on GitHub ↗
(bot)

Source from the content-addressed store, hash-verified

53
54@pytest.fixture
55def user(bot):
56 user = User(
57 id=UserTestBase.id_,
58 first_name=UserTestBase.first_name,
59 is_bot=UserTestBase.is_bot,
60 last_name=UserTestBase.last_name,
61 username=UserTestBase.username,
62 language_code=UserTestBase.language_code,
63 can_join_groups=UserTestBase.can_join_groups,
64 can_read_all_group_messages=UserTestBase.can_read_all_group_messages,
65 supports_inline_queries=UserTestBase.supports_inline_queries,
66 is_premium=UserTestBase.is_premium,
67 added_to_attachment_menu=UserTestBase.added_to_attachment_menu,
68 can_connect_to_business=UserTestBase.can_connect_to_business,
69 has_main_web_app=UserTestBase.has_main_web_app,
70 has_topics_enabled=UserTestBase.has_topics_enabled,
71 allows_users_to_create_topics=UserTestBase.allows_users_to_create_topics,
72 can_manage_bots=UserTestBase.can_manage_bots,
73 supports_guest_queries=UserTestBase.supports_guest_queries,
74 )
75 user.set_bot(bot)
76 user._unfreeze()
77 return user
78
79
80class UserTestBase:

Callers

nothing calls this directly

Calls 3

UserClass · 0.90
_unfreezeMethod · 0.80
set_botMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…