3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-18 08:02:51 +01:00
Commit Graph

49 Commits

Author SHA1 Message Date
James Lu
5ccf204c75 protocols: consolidate modeClient and modeServer into mode() 2016-01-16 17:08:17 -08:00
James Lu
983edaf8d0 plugins, docs, test suite: update to use irc.proto.kick 2016-01-16 16:59:28 -08:00
James Lu
5324475d18 protocols: quitClient(...) -> quit(...), partClient(...) -> part(...) 2016-01-16 16:51:54 -08:00
James Lu
7e5284969d protocols: rename nickClient(...) -> nick(...) 2016-01-16 16:51:04 -08:00
James Lu
acdd7dbb78 protocols: rename joinClient(...) -> join(...) 2016-01-16 16:36:45 -08:00
James Lu
9811df3dfc Unbrick the tests 2015-12-26 14:30:14 -08:00
James Lu
091bdc22da Test suite updates (doesn't work yet) 2015-12-24 18:24:42 -08:00
James Lu
38672ab9f5 Drop test_proto_inspircd.py, it's broken and unmaintained
Eventually, I plan to replace these with a generic protocol module test suite, which can hot-swap protocol modules and test all of them in a loop of some sort.
2015-12-24 18:18:16 -08:00
James Lu
bbedd38703 world: rename command_hooks=>hooks, bot_commands=>commands 2015-09-27 10:53:25 -07:00
James Lu
31aa624a94 tests/inspircd: remove checks for FMODE hook data, they change too often 2015-09-13 14:06:20 -07:00
James Lu
9cd176b846 utils.reverseModes: don't reverse prefix/list modes that were never set
Charybdis/TS6 doesn't check this IRCd-side, so we don't want people to abuse this by say, overriding -b *!*@* in a relay channel and having the PyLink client set +b *!*@* in response,
2015-09-13 14:05:07 -07:00
James Lu
dfaa5036ab Fix test cases
- conf: add sidrange server config variable (needed by TS6SIDGenerator)
- protocols: stop hardcoding various UIDs that may or may not exist.
2015-09-12 22:34:55 -07:00
James Lu
dab29cfc19 utils: add a proper reverseModes() with tests
Closes #107.
2015-09-12 22:31:20 -07:00
James Lu
3217f726f8 Fix those test cases again. 2015-09-06 23:39:10 -07:00
James Lu
d270a18285 Remove unused imports 2015-08-30 12:53:30 -07:00
James Lu
a58bee7355 Modularize tests using common classes, add our custom test runner (#56) 2015-08-29 14:06:07 -07:00
James Lu
973aba6de7 Move utils' global variables to world.py 2015-08-29 09:39:33 -07:00
James Lu
b71e508acc classes.Irc no longer needs a conf argument; tweak tests again 2015-08-28 19:38:16 -07:00
James Lu
ad5fc97e21 Many fixes to test API, utils.reverseModes stub 2015-08-28 19:28:06 -07:00
James Lu
254ccea0a3 remove some debugging cruft and unused imports 2015-07-23 11:46:45 -07:00
James Lu
57e9bf601e Log command usage, 'exec' usage, successful logins, and access denied to commands in admin.py
Closes #66.
2015-07-19 15:01:49 -07:00
James Lu
a51cfcb7b2 Fix fakeirc and tests for relay (#56) 2015-07-17 22:52:55 -07:00
James Lu
6870e041bc relay: catch nicks that start with digits and add tests 2015-07-12 16:59:49 -07:00
James Lu
ffec80ee45 tests/: update for new multi-net config format 2015-07-09 18:42:38 -07:00
James Lu
652d53c29e pr/insp: drop tests for validing channel names 2015-07-09 18:40:32 -07:00
James Lu
049b7f5049 pr/insp: add modeServer, modeClient commands
Closes #32.
2015-07-08 18:23:32 -07:00
James Lu
cbfabb2ba1 pr/insp: add OPERTYPE command handler
This is sent by InspIRCd for oper ups; there is no MODE command for it.
2015-07-08 18:03:08 -07:00
James Lu
7a37f50a1a utils.joinModes: support joining modes with prefixes 2015-07-08 16:58:59 -07:00
James Lu
5989f11ec0 pr/insp: tests for SERVER, SAVE, NICK, and INVITE 2015-07-08 13:56:28 -07:00
James Lu
2d4d8dd247 tests and stuff 2015-07-08 13:35:20 -07:00
James Lu
85e6a1aea2 pr/insp: more tests for hooks, etc 2015-07-07 20:59:35 -07:00
James Lu
0f03a2398b Updates to test_proto_inspircd.py
New tests: testFjoinResetsTS, testHandleTopic, and testHandleFTopic
2015-07-07 18:30:42 -07:00
James Lu
8f75c5363c Move all the FakeIRC stuff to classes.py, update FakeIRC with the ability to get hook data 2015-07-07 18:07:20 -07:00
James Lu
098b29ae2d Correction: it is legal for a server name to end with '.', but it can't start with it 2015-07-07 14:31:47 -07:00
James Lu
fe1f90bcd1 FakeIRC: swap arrows in debug output
This is for more consistency with the real protocol debug output:

-> is protocol OUTBOUND - irc.send()
<- is protocol INBOUND - irc.run()
2015-07-06 12:54:30 -07:00
James Lu
b3f369aa81 tests for utils.joinModes so I don't break it in the future 2015-07-06 12:38:45 -07:00
James Lu
170620c410 applyModes: remove old modepairs when setting non-list modes that require params
Closes #30.
2015-07-05 23:15:17 -07:00
James Lu
48c3b4b2e9 applyModes: chop off the +/- part of each mode tuple when storing mode lists
Also update these tests accordingly.
2015-07-05 23:00:14 -07:00
James Lu
f1e26b6c55 Fix tests for FakeIRC and update comment style 2015-07-05 22:59:55 -07:00
James Lu
2cbd6fd851 Tests for FMODE/FJOIN, and bugfixes 2015-07-05 19:19:49 -07:00
James Lu
211decd2aa everything: Improve logging 2015-07-05 13:44:48 -07:00
James Lu
d23d34e316 Refactor hooks to send parsed arguments instead of raw args
ref #18.

- Command handlers that support hooks will now return parsed args, which are then sent to the hooks
- Hook commands are now stored in uppercase letters, consistent with the IRC spec
2015-07-04 19:00:29 -07:00
James Lu
b6f489fa9c add tests for KILL, KICK, UID, and SERVER handlers
todo: rewrite the MODE handling so it doesn't suck, and test those too
2015-07-04 12:34:33 -07:00
James Lu
8ea62c31de tests for spawnServer and SQUIT, make server name case-insensitive 2015-07-04 11:57:21 -07:00
James Lu
942f97352d test kick/nickClient; make kickClient update channel userlist... 2015-07-03 23:48:28 -07:00
James Lu
18528c9cab add tests for spawn/quit/join/partClient 2015-07-03 23:32:41 -07:00
James Lu
0bfe2b2a21 test_proto_inspircd: fix 'python3 -m unittest' compat 2015-07-03 18:26:13 -07:00
James Lu
8ad68023d6 Add tests for pr/inspircd, a common FakeIRC class, and tests for that too 2015-07-03 18:07:47 -07:00
James Lu
991e86a8cb unittests! wow! 2015-07-03 17:05:44 -07:00