It works in the test suite because other plugins do the right import,
but we need to do it here as well if we want supybot-test to run on
this plugin alone.
- Remove author sorting; it's not obvious that this is being done anyways.
- Format author and contributors as separate sentences; conjunctions are messy for code and very language-specific.
This has limited value these days, because 1) the email info for authors is most often in a public VCS already 2) it makes using the actual contact info harder.
This is not really a native Debian package and this directory hasn't been touched in years.
The actual Debian packaging work is done on salsa.debian.org.
* utils.web: Import html escaping functions
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* Aka: Add web interface for browsing Akas
Fixes#1226.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* httpserver: Actually handle KeyError in unhook
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* test: FakeHTTPConnection: Don't decode data in send
BaseHTTPRequestHandler expects to get bytes, so we can't decode the sent
data.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* test: HTTPPluginTestCase: Use BytesIO instead of StringIO
BaseHTTPRequestHandler expects bytes, not strings.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* test: HTTPPluginTestCase: Rewind wfile to 0 before reading the response
Otherwise the read pointer is at the end of the file.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* Aka: Add basic web UI tests
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* use string.capwords() - not .title(). closes#1366
* add test case for "@format title" that checks handling apostrophes
* `assertResponse` evidently needs the relevant subcommand
Fixes#1350. This works around an edge case in charybdis / ircd-seven where remote
whois requests to a UID are not accepted if it is given in a different case.
So an old cache does not take precedence over a newly set value.
I noticed this bug because of the time going backward in tests
because of the time.time mock introduced in
dcf55cf6de, but this may happen
in production systems too.
Also adds another deprecation warning for python < 3.3.
Which means there may be a command/update thread running and returning after assertNoResponse returns.
In particular, that's an issue when assertNoResponse is called right before
setting feedparser._open_resource, because the running thread might still
be holding the lock but have fetched the new version already, so the
thread announces the new feed elements earlier than expected.
Otherwise, if it's provided and the network doesn't exist (or the bot isn't
currently connected to it), it's interpreted as being a quit message and
disconnects from the current network.