Jean-Paul Calderone
15f01c93bf
Merge pull request #739 from tahoe-lafs/3339-assertutil-python-3
...
Port assertutil and mathutil to Python 3 (by switching to already-ported pyutil versions)
2020-07-13 13:01:55 -04:00
Sajith Sasidharan
144001f380
Use a better assert in status subpath test
2020-07-11 08:30:39 -04:00
Sajith Sasidharan
d4a02aa1cd
Remove a print statement
2020-07-09 17:14:55 -04:00
Sajith Sasidharan
5276ea5b37
Merge branch 'master' into 3254.status-status-nevow-to-twisted-web
2020-07-09 17:09:50 -04:00
Sajith Sasidharan
956c2c535d
Remove unused import
2020-07-09 17:09:12 -04:00
Sajith Sasidharan
a56d077d3d
Test HTML document generated by web.status.Status
2020-07-09 16:59:04 -04:00
Jean-Paul Calderone
133e1bfb6f
news fragment
2020-07-09 16:05:31 -04:00
Jean-Paul Calderone
c4437bd194
Package Future 0.18.2 for us
2020-07-09 16:05:31 -04:00
Jean-Paul Calderone
349d34b099
add some alt text
2020-07-09 16:05:31 -04:00
Jean-Paul Calderone
50ce511cf3
Perhaps this is the preferred formatting?
2020-07-09 16:05:31 -04:00
meejah
7b8ab9cfa6
add meejah to code-of-conduct
2020-07-09 16:05:31 -04:00
Jean-Paul Calderone
defac12b19
add a contributor covenant badge
2020-07-09 16:05:31 -04:00
Jean-Paul Calderone
07064f096f
news fragment
2020-07-09 16:05:31 -04:00
Jean-Paul Calderone
ff8785acbe
as far as I can tell there is nothing magic about putting it in .github
2020-07-09 16:05:31 -04:00
Jean-Paul Calderone
4e2cc6e1fd
Here's a start
2020-07-09 16:05:31 -04:00
Itamar Turner-Trauring
83f36ab6c2
Switch to flake8 as a better way of running pyflakes.
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
8331e7d8ec
Remove now-unnecessary UploadResultsPage.render_UPLOAD
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
44ecfdad09
Make UploadResultsPage a Resource
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
62e803db25
Make UploadStatusPage a Resource
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
38fe7dd3f5
Remove unused import
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
f30dcc7ec6
Make Element the superclass of UploadResultsRendererMixin
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
4b560d10cc
Move time formatter tests
...
UploadResultsRendererMixin no longer has render_time(); moving tests
for render_time() as tests for abbreviate_time() to a more appropriate
place.
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
9c14eec1e0
Avoid use of RateAndTimeMixin in UploadResultsRendererMixin
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
100c4b1cde
Add newsfragment
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
118ea4267c
Render abbreviated rate and time values
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
c0d83def22
Document UploadResultsPage parameter
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
0af8df7203
Document UploadStatusPage
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
855668b188
Remove unused imports
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
a0655c18d6
Handle "t=upload" in UploadResultsPage POST handling
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
6b4d27bec1
Use twisted web template in UploadResultsRendererMixin
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
2ab7b15f8b
Make UploadResultsPage a MultiFormatResource
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
71fd4f5d10
Use twisted template tags in upload results page template
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
e6f0f9d038
Make UploadStatusPage a MultiFormatResource
2020-07-09 16:05:31 -04:00
Sajith Sasidharan
d24babe873
Use twisted template tags in upload status page template
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
96fbff684f
Use an inner JSONRequest class with renderJSON
...
Once nevow is removed from web/common.py, we can simplify
renderJSON(), like so:
def renderJSON():
req = Request()
req.args = {"t": ["json"]}
req.fields = {}
return resource.render(req)
But for now we have to live with an inner class that implements the
nevow.inevow.IRequest interface.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
92e83f268b
Declare JSON request interface using @implementer
...
"zope.interface.implements(IRequest)" is deprectated in favor of
"@zope.interface.implementer(IRequest)" decorator.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
d449306b19
Use DummyRequest in storage tests
...
Using twisted.web.server.Request causes test_new_style_classes to
fail like so:
Traceback (most recent call last):
Failure: testtools.testresult.real._StringException: Traceback (most recent call last):
File ".tox/coverage/lib/python2.7/site-packages/allmydata/test/test_python2_regressions.py", line 69, in test_new_style_classes
"Expected to find no classic classes.",
File ".tox/coverage/lib/python2.7/site-packages/testtools/testcase.py", line 502, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = set([])
actual = set([<class allmydata.test.test_storage.JSONRequest at 0x7fd938040bb0>])
: Expected to find no classic classes.
Seems that `DummyRequest` is an acceptable new style class.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
6b61b75658
Refactor storage test helpers
...
Rewrite `renderSynchronously()` to use `renderDeferred()`
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
bdfa667a22
Add docstrings to storage test helpers
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
7e26dd42e9
Remove redundant render_json() method
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
6379601722
Wrap renderer results in tags
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
0af744610f
Avoid using nevow FakeRequest in storage test.
...
Use twisted.web.server.Request instead, with a DummyChannel.
There's still one line of inevitable nevow now, because of code in
web/common.py; but that should be easily replaceable once we switch
that over.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
de5d04ab79
Remove an extraneous directive
...
`t:data` is not really a Twisted template directive. Added my
mistake, removing now.
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
a056f18ca9
Remove StorageStatus.renderHTTP
...
This was added to please the test suite. Pleased to remove it!
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
a6e6c5cee0
Get rid of WebRenderingMixin in storage test
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
8d31791940
Use a helper to exercise render() in storage test cases
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
7126d3247c
Prefix member variable with "_"
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
0d9ec2b206
Use slots to render storage stats table
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
9dd9d98b8c
Give the suite the precise string it wants
2020-07-09 16:05:30 -04:00
Sajith Sasidharan
1469af0f3b
Use BeautifulSoup to check favicon in storage page
2020-07-09 16:05:30 -04:00