Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing support #28

Closed
punyflash opened this issue Sep 22, 2021 Discussed in #27 · 3 comments
Closed

Testing support #28

punyflash opened this issue Sep 22, 2021 Discussed in #27 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@punyflash
Copy link
Member

Discussed in #27

Originally posted by roelofr September 21, 2021
Hey there,

I just discovered this package via my GitHub homepage (I didn't know it did that).

It looks great, but I'm seeing no docs on testing from an end-user perspective (which is something a lot of Telegram bot packages don't have).

What would be the best way to test this, I'd be glad to help.

@punyflash punyflash added enhancement New feature or request good first issue Good for newcomers labels Sep 22, 2021
@newtmex
Copy link

newtmex commented May 10, 2022

I think the way to test this would be to have a complete end-to-end testing setup.

I have had this thought before, but in a different form.

I write unit and feature tests, I would love to fake the sending of messages with telebot, just the way we can fake sending mails or dispatching of events.

@punyflash
Copy link
Member Author

I think the way to test this would be to have a complete end-to-end testing setup.

I have had this thought before, but in a different form.

I write unit and feature tests, I would love to fake the sending of messages with telebot, just the way we can fake sending mails or dispatching of events.

Well, this is the way I'm trying to implement right now and this is not feel right so far - there is no way to check if you're giving proper request parameters and data flow is just makes no sense. I do believe that the correct way would be something like in telegram-test-api, but this is tons of work to do - I will die trying to support this.

@punyflash
Copy link
Member Author

Most methods support mocking now. Implementing whole replica of bot API is not convenient.

@punyflash punyflash closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants