summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2021-12-25Make sure unit tests can be run from outside the packageOlivier Gayot
The cards from usr/share are not accessible when running the tests from a temporary directory. This happens for instance when running $ pybuild --test --test-pytest Make sure that this command would succeed by mocking the calls to open. Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-12-25Move WS code outside the main into swiftstory.interface.ws.pyOlivier Gayot
Also, the GameManager object is not created globally anymore when importing the module. Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-12-23Use lowercase module namesOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2021-12-23Use __main__.py instead of SwiftStory.pyOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-09-13Add test for joining game without specifying the nameOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-09-13Add test for play_card without card ID specifiedOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-09-13Handle exception when JSON received is not an objectOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-09-12Add more tests for invalid commandsOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-09-12Add test for invalid JSON receivedOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-16Add unit tests for boardOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-14Use unittest machanism to assert on exceptionsOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-12Add unit tests for swiftstory.StatusOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2020-05-12Add unit tests for swifstory.cardsOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>