Test classes¶
SkPy comes with some test cases that cover expectations from the server, and the correctness of the library’s parsing.
Client testing¶
Here, responses from the server are mocked out and replaced with static strings, so the real Skype server is never contacted. Test cases aim to ensure the library parses each response correctly.
Server testing¶
These tests connect to the production Skype server to perform actions, checking that requests to and responses from the server are consistent with the library.
- class test.server.SkypeServerTestBase[source]¶
Base class for tests designed to interpret server responses.
Warning
This requires access to a live Skype account, the credentials for which will be read from .tokens (or from a file named in environment variable
SKPY_TESTSERVER_TOKENS
if set). This can be accomplished in a shell:>>> from skpy import Skype >>> Skype(username, password, tokenFile=".tokens")
You must also set
SKPY_TESTSERVER_RECIP
to a contact on the account that should receive test messages.
- class test.server.SkypeServerReadTest[source]¶
Basic, read-only tests on information provided by the server for the connected account.
- class test.server.SkypeServerWriteTest[source]¶
Specific test cases that require performing “write” actions on the connected account.