Commit Graph

9498 Commits

Author SHA1 Message Date
Sajith Sasidharan
d1f17e1019 Second version of renderSynchronously 2020-07-09 16:05:29 -04:00
Sajith Sasidharan
805b880c2e Add missing flattenString import 2020-07-09 16:05:29 -04:00
Sajith Sasidharan
75488c4aff Add StorageStatus::renderSynchronously
Related to ticket:3247

test_storage.py wants a `StorageStatus::renderSynchronously()` method
and a `StorageStatus::renderHTTP()` method.  Let us begin with the
goofy first-cut.

Both these methods are not only wrong, but they will also not please
the test suite.  However error messages produced in CI can be shared,
and that way I can hopefully get unstuck.
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
aad3557d2b Use twisted.web.template in web/storage.py
Related to ticket:3247.  Nevow usage has been removed, and generated
page looks the same as its former self, but tests are failing because
test_storage.py assumes that we're using nevow.
2020-07-09 16:05:29 -04:00
meejah
7a37eeee67 assert -> Exception 2020-07-09 16:05:29 -04:00
meejah
5cfb350771 streap -> stream 2020-07-09 16:05:29 -04:00
meejah
1f4b619fda unused imports 2020-07-09 16:05:29 -04:00
meejah
77a2f11694 more-testtools-y asserts 2020-07-09 16:05:29 -04:00
meejah
1ce760b237 testtool's asserts 2020-07-09 16:05:29 -04:00
meejah
26d7a3a957 Get rid of ?replace= handling entirely and more-correctly support /uri variants 2020-07-09 16:05:29 -04:00
meejah
e0287a7bfe use attr.s 2020-07-09 16:05:29 -04:00
meejah
af70911e2f embetter docstring 2020-07-09 16:05:29 -04:00
meejah
ced9bdeb25 different words for news 2020-07-09 16:05:29 -04:00
meejah
d91996aa82 better docstring 2020-07-09 16:05:29 -04:00
meejah
eaf96b22fe replciate Tahoe's behavior for replace=true/false 2020-07-09 16:05:29 -04:00
meejah
a3f4cc6983 symbols, not magic-numbers 2020-07-09 16:05:29 -04:00
meejah
0f6b4c33ac match query args 2020-07-09 16:05:29 -04:00
meejah
66f61c514b assert -> ValueError 2020-07-09 16:05:29 -04:00
meejah
bd858f8fef assert -> raise 2020-07-09 16:05:29 -04:00
meejah
835341f2c2 more docstring 2020-07-09 16:05:29 -04:00
meejah
6fd0d61d5e comment 2020-07-09 16:05:29 -04:00
meejah
10715fa26b docstring 2020-07-09 16:05:29 -04:00
meejah
9420777810 cleanup, docstrings 2020-07-09 16:05:29 -04:00
meejah
e481e37beb housekeeping 2020-07-09 16:05:29 -04:00
meejah
9d5e438c2d use real parser 2020-07-09 16:05:29 -04:00
meejah
683c8d3e4f actually returns CREATED for new data 2020-07-09 16:05:29 -04:00
meejah
b01995f158 use hypothesis -- which doesn't know about Deferred, so need testtools too 2020-07-09 16:05:29 -04:00
meejah
0cc020b5f2 copyright, header 2020-07-09 16:05:29 -04:00
meejah
1710530b6b key -> kind 2020-07-09 16:05:29 -04:00
meejah
c0ce716430 handle more inputs in test body-producer 2020-07-09 16:05:29 -04:00
meejah
1f2ad6e634 the tests are unit-tests 2020-07-09 16:05:29 -04:00
meejah
02a663c244 new-style classes only 2020-07-09 16:05:29 -04:00
meejah
18b62bf746 unused imports 2020-07-09 16:05:29 -04:00
meejah
05140a5881 simple test of testing/web 2020-07-09 16:05:29 -04:00
meejah
f216f977f0 news 2020-07-09 16:05:29 -04:00
meejah
66116020fb simplify tahoe web fakes 2020-07-09 16:05:29 -04:00
meejah
95531fa729 synchronous-only up/download tahoe code to keep treq.testing happy 2020-07-09 16:05:29 -04:00
meejah
ab7936db56 actual usable agent 2020-07-09 16:05:29 -04:00
meejah
6e2285ed2c proof-of-concept verified-fake for testing 2020-07-09 16:05:29 -04:00
Sajith Sasidharan
1fd220dba0 Update newsfragment text 2020-07-09 16:05:29 -04:00
Sajith Sasidharan
b956d9a58c Decode name before null check
Make the diff against master a tad bit smaller.
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
fccc331671 Make "Refresh" link work
This seems to be a subtle difference from nevow: with `href="."`,
rendered link target will be `/uri/`, so clicking "Refresh" will
result in an error message like so: "GET /uri requires uri=".

With `href=""`, the rendered link target will be `/uri/URI:...`, which
is what we need.
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
378b20c51a Reject trailing empty path piece in URIs 2020-07-09 16:05:29 -04:00
Sajith Sasidharan
d3d0d02855 Reject URIs that contain empty segments 2020-07-09 16:05:29 -04:00
Sajith Sasidharan
83b5807ca1 Add newsfragment 2020-07-09 16:05:29 -04:00
Sajith Sasidharan
5892eae580 Render self in DirectoryNodeHandler.getChild()
We need self.render_POST() etc. to be invoked when we have a request
such as "POST /uri/URI:DIR:..."; throwing an error here is probably
not the right thing to do.
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
7444d6b7a9 Correct arguments to super()
This was incidentally found when looking at some test failures:
super(type, object) is the right invocation, and not the other way
around.
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
88accc23c3 Update newsfragment 2020-07-09 16:05:29 -04:00
Sajith Sasidharan
c043d1bead Add newsfragment 2020-07-09 16:05:29 -04:00
Sajith Sasidharan
4dd6c86950 Use twisted web directives in web.operations.ReloadMixin 2020-07-09 16:05:28 -04:00