Commit Graph

5717 Commits

Author SHA1 Message Date
Itamar Turner-Trauring
cab1b02ba2 Use constants, since we have them. 2020-07-23 11:47:12 -04:00
Itamar Turner-Trauring
b0083e342b Document being ported. 2020-07-23 11:47:06 -04:00
Itamar Turner-Trauring
eb688dfd7e Fix lint. 2020-07-22 13:22:50 -04:00
Itamar Turner-Trauring
e48aecfa1a Move parsing tests to better location, and fix them. 2020-07-22 12:55:16 -04:00
Itamar Turner-Trauring
2f608e8216 Merge remote-tracking branch 'origin/master' into 3346.abbreviate-and-time_format-py3 2020-07-22 10:11:27 -04:00
Itamar Turner-Trauring
51e9c2183c Add missing file. 2020-07-22 10:00:15 -04:00
Itamar Turner-Trauring
fa567841b5 Merge remote-tracking branch 'origin/master' into 3342-base32-and-base62-to-python-3 2020-07-21 14:40:33 -04:00
Itamar Turner-Trauring
6de05941b9 Remove unnecessary imports. 2020-07-21 14:27:08 -04:00
Itamar Turner-Trauring
4018b772a3 Port abbreviate.py. As far as I can tell, all division is already float division. 2020-07-21 14:15:39 -04:00
Itamar Turner-Trauring
116f232e80 Port time_format to Python 3. 2020-07-21 14:08:31 -04:00
Itamar Turner-Trauring
c229ba7196 Workaround future/pypy incompatibility. 2020-07-21 13:55:53 -04:00
meejah
30a91a1106 public RSA exponent 17 -> 65537 2020-07-21 00:29:35 -06:00
Sajith Sasidharan
e145c7b00d
Merge pull request #722 from sajith/3254.status-status-nevow-to-twisted-web
Replace nevow with twisted.web.template in status.Status

Fixes: ticket:3254
2020-07-20 11:28:18 -04:00
Sajith Sasidharan
26ca9ae724
Merge pull request #726 from sajith/3313.operations-ophandle-table-nevow-to-twisted
Replace nevow with twisted.web in operations.OphandleTable

Fixes: ticket:3313
2020-07-19 08:14:32 -04:00
Sajith Sasidharan
c58cf56e83 Remove unused imports 2020-07-18 08:34:25 -04:00
Sajith Sasidharan
0f835e94f5 Merge 'origin/master' into 3254.status-status-nevow-to-twisted-web 2020-07-18 07:53:36 -04:00
Sajith Sasidharan
6dec821271
Merge pull request #720 from sajith/3288.status-download-nevow-to-twisted-web
Replace nevow with twisted.web.template in status.DownloadStatusPage

Fixes: ticket:3288
2020-07-18 07:22:37 -04:00
Sajith Sasidharan
879a8012a0 Remove unused import 2020-07-18 06:48:36 -04:00
Sajith Sasidharan
c198c006e3 Avoid over-long lines 2020-07-17 21:02:24 -04:00
Sajith Sasidharan
fe07ab39da Use docstrings 2020-07-17 16:22:23 -04:00
Sajith Sasidharan
c14197e1bc Make FakeDownloadStatus an instance of DownloadStatus
The real DownloadStatus is easy enough to instantiate.  Might as well
use that, cutting some crufty code here.
2020-07-17 16:13:07 -04:00
Sajith Sasidharan
293efd7c9f Use actual status counter number when testing 2020-07-17 13:50:06 -04:00
Sajith Sasidharan
8fd0cf7eb6 Add a test for checking status page links 2020-07-17 13:21:53 -04:00
Sajith Sasidharan
828ec53e24 Update status page test case
Link to upload status 0 should contain `/status/` prefix, or it will
navigate to `/up-0` instead of `/status/up-0`, resulting in a 404 not
found message.  Same with other statuses too.
2020-07-17 13:21:53 -04:00
Sajith Sasidharan
5c886b1b2d Format link to status page child node correctly
Some Nevow-ism accidentally escaped earlier: link to `/status/up-0`
and so on were actually rendered as `/up-0` and so on.
2020-07-17 13:21:53 -04:00
Sajith Sasidharan
2d19c383ca Rename a variable for clarity 2020-07-17 13:21:53 -04:00
Sajith Sasidharan
02d8bd061a Test for trailing slashes after /status/
Both `/status` and `/status/` are treated alike; any additional
trailing slashes will be rejected.
2020-07-17 13:21:53 -04:00
Sajith Sasidharan
372cc00a25 Reject non-existent child nodes of /status
Requests on both `/status` and `/status/` will be served with the same
status page, but `/status//`, `/status///` and so on will be processed
further down, resulting in a 40x response.
2020-07-17 09:46:21 -04:00
Sajith Sasidharan
fe165cc99d Do the right thing, not the simple thing
Seems that NixOS CI is saying that the simple thing is not the right
thing: "GET /status/down-0" etc all resulted in 404 responses on
NixOS.  So we perhaps should use the actual counter value.
2020-07-16 19:07:51 -04:00
Sajith Sasidharan
06c8bbfb19 Use clearer names for tests 2020-07-16 17:25:25 -04:00
Sajith Sasidharan
66dd2d3658 Use docstrings 2020-07-16 17:19:50 -04:00
Sajith Sasidharan
8db60e3486 Do the simple thing when testing status subpaths 2020-07-16 17:16:18 -04:00
Sajith Sasidharan
95642ae02c Use a helper to check status subpath results 2020-07-16 17:13:36 -04:00
Sajith Sasidharan
e48d930621 Clarify intention of a test case 2020-07-16 16:56:41 -04:00
Sajith Sasidharan
6a2ce9efc6 Use docstrings 2020-07-16 16:55:12 -04:00
Itamar Turner-Trauring
a4620bf176 Automated port of the test module. 2020-07-16 15:58:39 -04:00
Itamar Turner-Trauring
4c047b90e5 Manual steps of port to Python 3. 2020-07-16 15:46:23 -04:00
Itamar Turner-Trauring
e90d1f38d2 Make TimezoneMixin importable on Python 3. 2020-07-16 15:44:41 -04:00
Itamar Turner-Trauring
554be90b7e Unnecessary code, and was triggering flake8. 2020-07-16 15:27:36 -04:00
Itamar Turner-Trauring
72272cbf0b Move out tests for time_format. 2020-07-16 15:15:26 -04:00
Itamar Turner-Trauring
545848f164 Move abbreviate tests into their own module. 2020-07-16 14:57:09 -04:00
Itamar Turner-Trauring
8d143af43e Another assertion. 2020-07-16 14:40:30 -04:00
Itamar Turner-Trauring
2f693c47f9 Don't leak variable on Python 2. 2020-07-16 14:37:26 -04:00
Itamar Turner-Trauring
efbae9b3e3 Hard code some known values, generated on the master branch preceding these
changes.
2020-07-16 14:33:53 -04:00
Itamar Turner-Trauring
7abc54c429 Merge remote-tracking branch 'origin/master' into 3342-base32-and-base62-to-python-3 2020-07-16 14:21:42 -04:00
Jean-Paul Calderone
0ce6e562cb
Merge pull request #742 from chadwhitacre/3325.add-py36-to-ci
Add py36 to CI

Fixes: ticket:3325
2020-07-15 20:11:39 -04:00
Jean-Paul Calderone
c493396148
Merge pull request #740 from tahoe-lafs/3340-unused-code-in-util
Delete some dead code.

Fixes: ticket:3340
2020-07-15 20:08:41 -04:00
Itamar Turner-Trauring
6af32fdfa7 Make sure the public API exposes native bytes, not Future bytes. 2020-07-15 15:59:46 -04:00
Itamar Turner-Trauring
ed6e1cb7ef Fix formatting. 2020-07-15 15:51:09 -04:00
Itamar Turner-Trauring
3688291df2 Handy way to run Python 3 tests, until the ratchet is going. 2020-07-14 13:53:26 -04:00