Commit Graph

1344 Commits

Author SHA1 Message Date
Brian Warner
bdef446ad4 get mostly-full coverage for rlcompleter, rename, export 2017-04-06 12:22:45 -07:00
Brian Warner
8882e6f64e merge test_wormhole_new into test_wormhole 2017-04-06 12:22:45 -07:00
Brian Warner
8d47194612 check when_version() can be called late as well as early 2017-04-06 12:22:45 -07:00
Brian Warner
580c5a4712 remove unused channel_monitor.py 2017-04-06 12:22:45 -07:00
Brian Warner
6eae5ecf64 better py2/py3 fix, use locale of C.UTF-8 or en_US.UTF-8
This updates the unit tests to checks the system (by running 'locale -a' just
like Click does) to use a UTF-8 -safe locale. It prefers C.UTF-8 if
available, then en_US.UTF-8, then will fall back to any UTF-8 it can find.

My macOS box has en_US.UTF-8 (but not C.UTF-8), and my linux box has
C.UTF-8 (but not en_US.UTF-8). This change doesn't help normal runtime, but
ought to allow the unit tests to run on either platform correctly.
2017-04-06 12:22:45 -07:00
Brian Warner
d0d2992d44 fix some py2-isms that broke py3
This also changes the can-I-run-wormhole check to use C.UTF-8 instead of
en_US.UTF-8, which seems necessary to hush Click on py3. See issue #127 for
more discusson.
2017-04-06 12:22:45 -07:00
Brian Warner
b981b4260d docs: reminder that welcome_handler may be called multiple times 2017-04-06 12:22:45 -07:00
Brian Warner
228e0ed671 set_trace: tolerate an Automat that lacks m.setTrace
wormhole.debug_set_trace() won't work until glyph/automat#56 lands, but this
should let travis do its job in the meantime.
2017-04-06 12:22:45 -07:00
Brian Warner
76f5960517 rewrite welcome handler 2017-04-06 12:22:45 -07:00
Brian Warner
152775c5c0 hush pyflakes 2017-04-06 12:22:45 -07:00
Brian Warner
bbef68c11e remove no-longer-relevant tests 2017-04-06 12:22:45 -07:00
Brian Warner
271efb6025 match new Automat tracing API (in glyph/automat#56 PR) 2017-04-06 12:22:45 -07:00
Brian Warner
d44a5335b4 _mailbox: new Automat forbids code in Input bodies 2017-04-06 12:22:45 -07:00
Brian Warner
3ca2720f11 Input: more debug text 2017-04-06 12:22:45 -07:00
Brian Warner
b38d4c94ca Code: deliver got_code to Boss before Key
So when Key sends got_key to Boss, Boss will be ready for it

test_machines: match new delivery order
2017-04-06 12:22:44 -07:00
Brian Warner
0ed363c894 Key: sort messages to ensure got_code lands before got_pake
Since input_code() sets the nameplate before setting the rest of the code,
and since the sender's PAKE will arrive as soon as the nameplate is set, we
could got_pake before got_code, and Key wasn't prepared to handle that.
2017-04-06 12:22:44 -07:00
Brian Warner
17b4ff9893 rework completion, vaguely works 2017-04-06 12:22:44 -07:00
Brian Warner
351a523d0b disable test_slow_text for now 2017-04-06 12:22:44 -07:00
Brian Warner
9267c204e9 test_wormhole_new: oops, forgot yield on assertFailure
This was breaking the last test that gets run (test_xfer_util) because of the
lingering failures.
2017-04-06 12:22:44 -07:00
Brian Warner
07a49bfaca make progress on rlcompleter, still broken 2017-04-06 12:22:44 -07:00
Brian Warner
1b5a0289a8 cmd_send: finally fix when_verified call 2017-04-06 12:22:44 -07:00
Brian Warner
a446d4333e start on new rlcompleter wrapper function 2017-04-06 12:22:44 -07:00
Brian Warner
f0cab020f4 hush some pyflakes 2017-04-06 12:22:44 -07:00
Brian Warner
e82d705764 unbreak other tests 2017-04-06 12:22:44 -07:00
Brian Warner
53a911cc80 finish Boss tests 2017-04-06 12:22:44 -07:00
Brian Warner
d8d305407b start on Boss tests 2017-04-06 12:22:44 -07:00
Brian Warner
bd974f3801 test Nameplate, Mailbox. refactor a little bit 2017-04-06 12:22:44 -07:00
Brian Warner
3a289f8912 add tests for Send and Terminator 2017-04-06 12:22:44 -07:00
Brian Warner
e66d2df9f1 test and fix wordlist methods 2017-04-06 12:22:44 -07:00
Brian Warner
3873f55d64 make Input tests pass, clarify error cases, cleanups 2017-04-06 12:22:44 -07:00
Brian Warner
175fef2ab4 clean up wordlist handling 2017-04-06 12:22:44 -07:00
Brian Warner
ae95948c17 more tweaks 2017-04-06 12:22:44 -07:00
Brian Warner
4f1b352b2a more work: allocator, input, shift responsibilities 2017-04-06 12:22:44 -07:00
Brian Warner
79d38da497 split Code into Code/Input/Allocator, ostensibly simpler 2017-04-06 12:22:44 -07:00
Brian Warner
ae8652daf6 code: internal name changes 2017-04-06 12:22:44 -07:00
Brian Warner
0be5aba77d begin worm on new Code machine 2017-04-06 12:22:44 -07:00
Brian Warner
0ddc93110b work on new Code state machine design 2017-04-06 12:22:44 -07:00
Brian Warner
e2c0f08216 minor renames for code-input helper stuff 2017-04-06 12:22:44 -07:00
Brian Warner
299f89c01f new idea on code-input helper API 2017-04-06 12:22:44 -07:00
Brian Warner
4bd9d3579c go back to "input_code" instead of "type_code" 2017-04-06 12:22:44 -07:00
Brian Warner
276fdd3673 fix tests that exercise failure 2017-04-06 12:22:44 -07:00
Brian Warner
29f467e9d8 CLI: don't hide errors, fuss with verifier API 2017-04-06 12:22:44 -07:00
Brian Warner
921228a702 log errors better 2017-04-06 12:22:44 -07:00
Brian Warner
7c18fb81dd only allow code to be set once 2017-04-06 12:22:44 -07:00
Brian Warner
2054e4c76b test app versions 2017-04-06 12:22:44 -07:00
Brian Warner
5f9894ca63 API updates, make most tests pass, disable others
* finally wire up "application versions"
* remove when_verifier (which used to fire after key establishment, but
  before the VERSION message was received or verified)
* fire when_verified and when_version at the same time (after VERSION is
  verified), but with different args
2017-04-06 12:22:44 -07:00
Brian Warner
e518f2b799 throw KeyFormatError when given a code with spaces 2017-04-06 12:22:44 -07:00
Brian Warner
aebee61816 fix close behavior: Deferreds should errback once closed 2017-04-06 12:22:44 -07:00
Brian Warner
9571fcd388 docs: write up "journaled mode" 2017-04-06 12:22:44 -07:00
Brian Warner
20ec911b6c add API list, and speculative sections on serialization and dilation 2017-04-06 12:22:44 -07:00