So there are a couple of things we'd want to test here.
- that calling
message.deleteactually calls the correct bot method depending onmessage.business_connection_id - that we correctly wrap
message.idin alist; in the case thatbusiness_connection_idis present. - finally, test that the shortcut signature matches the bot's one, and correctly passes the shortcut'ed parameters.
The way i'd approach this is to monkeypatch one level higher than the bot methods. (i.e request.post for example). you can have a look at test_business_methods.py for examples on monkeypatch.
Then we'd also need to have two test message objects, possibly as a parameterized fixture, you can also search the codebase or pytest docs for those. once that is done, we can modify the test behavior and expectations based on the type of the message.
shoot me any questions if some parts aren't clear.