Sajith Sasidharan
bc8a86e106
Use Unicode strings to render space
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
0b4c235fbd
Remove redundant None
-checks on self.storage
...
When no storage is up, `storage_running()` renderer will return a big
honking `no storage server running` message, and no further renderers
will be invoked. Therefore the extra defense is probably not
required.
(I tested this hypothesis. The extra defense is not required, unless
there's something I have not seen.)
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
db0e6407dc
Use successResultOf
in renderSynchronously
...
Get rid of [].append trick when dealing with the deferred.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
ee8e730727
Move renderSynchronously
to test suite
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
92f6e4bfe5
Use explicit None
-check on self.storage
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
affe10b3e9
Return result from renderHTTP
...
Bogus renderHTTP, but test failures are now down to three. We just
need to handle requests for JSON now.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
6b5e530cb3
Add a docstring
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
abb8834be1
Rename function for clarity
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
e67fa7cd95
Add docstrings to StorageStatusElement
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
ac9a73eddb
Use parentheses in test suite's import statement
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
62a997ce20
Use parentheses in import statement
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
1be736e4d1
Fix test_storage.WebStatus.test_no_server failure
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
8dd4029428
Use <t:transparent /> within table cells
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
6ccb9d29cb
Use render_space methods to render space
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
dbc6b2afa0
Drop unused ctx
argument from render_space methods
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
d5af7c0d2e
Refactor so that test_util pass
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
923219e54a
Use right syntax for twisted.web.template tags
2020-07-09 16:05:29 -04:00
Sajith Sasidharan
42c3e276a3
Check storage server status before using it
2020-07-09 16:05:29 -04:00
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