Commit Graph

43 Commits

Author SHA1 Message Date
joo
e9f095de42 Add ClientSettingsPacket and PluginMessagePacket.
Improve Packet string representation.
2017-08-24 05:49:32 +01:00
joo
3269a022a8 Add KeepAlivePacket test to ConnectTest and derived tests. 2017-08-22 18:16:07 +01:00
joo
b79e7b5f28 Add tests for early and outgoing packet listeners. 2017-08-22 17:50:16 +01:00
joo
9497aae8fa Make FakeServer class more reusable, and extract it into its own module. 2017-08-22 14:22:12 +01:00
joo
593c98f168 Add support for early and outgoing packet listeners. 2017-08-21 21:06:28 +01:00
joo
46e058dd08 Update all tests, docs and code to use new packet names. 2017-08-09 20:53:54 +01:00
joo
cf464d2da2 Add compression tests to test_connection. 2017-08-03 13:04:47 +01:00
Ammar Askar
f450ef5ff4
Add test for reactors 2017-07-16 20:02:50 -07:00
Ammar Askar
d686b6487f
Add testing for MapPacket 2017-07-16 15:18:09 -07:00
Ammar Askar
5b261b840e
Refactor out the action of writing out the packet header.
This allows subclasses of Packet to just call the new
method instead of having to duplicate the header writing
and compression code.
2017-07-16 13:40:00 -07:00
Ammar Askar
4ce8c7f6ca
Fix flake errors in test file 2017-07-16 02:53:52 -07:00
Ammar Askar
8859e0f7bf
Add test coverage for PlayerList packet 2017-07-16 02:42:16 -07:00
Ammar Askar
da967a4e56
Minor coverage improvement for packets 2017-07-16 01:20:08 -07:00
Ammar Askar
d8226d266f
Improve tests of types.py 2017-07-16 01:00:14 -07:00
Ammar Askar
ca4fd6680e
Connect to localhost instead of the socket's binding address.
The bound address is 0.0.0.0 which usually implies all
available interfaces, which makes sense when listening
for something. However, when connecting to an address,
a specific address needs to be targeted. Hopefully, any
properly configured computer should have `localhost`
pointing to its loopback interface. Fixes #64
2017-07-16 00:19:30 -07:00
joo
3f4571d9e9 Update testing configuration:
(1) Add py35 job to Travis.
(2) To address issue #57: run tests that connect to Mojang's auth server exactly once, during the py35 job.
(3) Measure coverage exactly once, during the py35 job; always submit the result to coveralls.
(4) Fix miscellaneous errors in generate_travis_yml.py.
2017-05-19 11:58:14 +01:00
joo
66a0603acf Fix various problems in minecraft.authentication and its tests:
- Return value of _make_request() is treated as a requests.Request, when it is in fact a requests.Response.
- Some tests in test_authentication use assertRaises() incorrectly, resulting in testing code that never gets run.
- Other miscellaneous errors exposed by the above changes.

Additionally:
- YggdrasilError instances now have fields with specific error information, and _raise_from_response() populates them. (This will be useful for later changes.)
2017-03-31 12:59:43 +01:00
Ammar Askar
89ca73532a
Fully cover authentication module 2016-12-19 06:57:45 -05:00
Ammar Askar
10fb291752
Add some additional tests for the authentication module 2016-12-19 06:39:01 -05:00
joo
bf17f99083 Change version negotiator to use a status query. 2016-11-22 14:47:42 +00:00
joo
d72f05c8b0 Show exceptions by default and add `handle_exception' parameter to Connection. 2016-11-20 06:04:22 +00:00
joo
115693f8c3 Implement full Server List Ping capability with test. 2016-11-20 06:04:22 +00:00
joo
37a9bb66f1 Fix test failures caused by new flake8 version. 2016-11-15 00:02:02 +00:00
joo
bb1de5ca21 test_connection: fix timing issues caused by resource leaks. 2016-09-01 23:32:51 +01:00
joo
abd2ee774c Add thread timeout detection to test_connection. 2016-08-22 18:20:16 +01:00
joo
9af39f186a Make test_connection more deterministic. 2016-08-22 17:46:53 +01:00
joo
d0169b2d0b Add support for Minecraft pre-release 16w32a (protocol 301). 2016-08-11 10:40:50 +01:00
joo
ce63626bb1 Add 4 tests in 'test_connection.py' and fix related bugs. 2016-06-18 18:22:18 +01:00
joo
3ff7662684 Update tests to match new API. 2016-06-17 22:54:21 +01:00
Ammar Askar
79ee31c44e Fix two python3 compatibility problems:
We need to explicitly encode the serverID before hashing it
Pass read/binary modes to the file made from socket to avoid encoding problems, fixes #29
2015-04-17 17:57:34 +05:00
Ammar Askar
a5a76a8e1c Added more tests, fixed compat.py to run on py3 as well 2015-04-12 07:26:12 +05:00
Jeppe Klitgaard
6daca43748 Added tests for YggdrasilError 2015-04-07 20:16:01 +02:00
Jeppe Klitgaard
ca81f7685a Moved tests around for more logical order. Made tests for Profile object. 2015-04-07 20:07:47 +02:00
Ammar Askar
5d56162300 Quick little base test for connection 2015-04-03 22:04:45 +05:00
Ammar Askar
ea11461e76 Fully test the encryption package, and add a test for uncompressed packets when packet compression is enabled 2015-04-03 21:30:31 +05:00
Ammar Askar
1249f99a1e Packet tests 2015-04-03 08:51:53 +05:00
Ammar Askar
08e126188a Add a serialization test 2015-04-03 08:06:20 +05:00
Ammar Askar
a073ee35d8 Add more encryption tests 2015-04-03 07:19:46 +05:00
Ammar Askar
c353d8bb86 Address more pylint and py3 compatibility problems 2015-04-03 02:25:34 +05:00
Ammar Askar
dcb2845ac4 Fix some pylint concerns 2015-04-03 01:44:03 +05:00
Ammar Askar
4fe5caa7d9 Added an easy encryption test 2015-04-02 22:02:47 +05:00
Jeppe Klitgaard
c34d30566f Made some tests for authentication. Still many tests to be made 2015-04-02 00:11:14 +02:00
Jeppe Klitgaard
4a38e6fe3d Added the first test, yay 2015-04-01 17:40:40 +02:00