Create Relay Bot MVP
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
from app.attachments.service import explicitly_requested
|
||||
|
||||
|
||||
def test_group_attachment_is_not_implicitly_accepted() -> None:
|
||||
assert not explicitly_requested(
|
||||
is_private=False,
|
||||
caption=None,
|
||||
replied_with_request=False,
|
||||
command=False,
|
||||
bot_username="relay_bot",
|
||||
)
|
||||
|
||||
|
||||
def test_explicit_attachment_rules() -> None:
|
||||
assert explicitly_requested(
|
||||
is_private=True,
|
||||
caption=None,
|
||||
replied_with_request=False,
|
||||
command=False,
|
||||
bot_username="relay_bot",
|
||||
)
|
||||
assert explicitly_requested(
|
||||
is_private=False,
|
||||
caption="please @relay_bot read",
|
||||
replied_with_request=False,
|
||||
command=False,
|
||||
bot_username="relay_bot",
|
||||
)
|
||||
assert explicitly_requested(
|
||||
is_private=False,
|
||||
caption=None,
|
||||
replied_with_request=True,
|
||||
command=False,
|
||||
bot_username="relay_bot",
|
||||
)
|
||||
Reference in New Issue
Block a user