You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2015/02/18 22:42:42 UTC
[1/4] allura git commit: PEP8 cleanup;
add license header to test_webhooks.py
Repository: allura
Updated Branches:
refs/heads/master 7a584f937 -> a3620b4af
http://git-wip-us.apache.org/repos/asf/allura/blob/a3620b4a/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index 38fd793..46cf8ce 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -47,7 +47,6 @@ from ming.orm.ormsession import ThreadLocalORMSession
class TrackerTestController(TestController):
-
def setUp(self):
super(TrackerTestController, self).setUp()
self.setup_with_tools()
@@ -81,7 +80,6 @@ class TrackerTestController(TestController):
class TestMilestones(TrackerTestController):
-
def test_milestone_list(self):
r = self.app.get('/bugs/milestones')
assert '1.0' in r, r.showbrowser()
@@ -192,8 +190,7 @@ class TestMilestones(TrackerTestController):
}
r = self.app.post('/bugs/update_milestones', d)
assert 'error' in self.webflash(r)
- assert app.globals.milestone_fields[0][
- 'milestones'][1]['name'] == '2.0'
+ assert app.globals.milestone_fields[0]['milestones'][1]['name'] == '2.0'
def test_default_milestone(self):
self.new_ticket(summary='bar', _milestone='1.0', status='closed')
@@ -230,7 +227,6 @@ def post_install_update_ticket_permission(app):
class TestSubprojectTrackerController(TrackerTestController):
-
@td.with_tool('test/sub1', 'Tickets', 'tickets')
def test_index_page_ticket_visibility(self):
"""Test that non-admin users can see tickets created by admins."""
@@ -265,7 +261,6 @@ class TestSubprojectTrackerController(TrackerTestController):
class TestFunctionalController(TrackerTestController):
-
def test_bad_ticket_number(self):
self.app.get('/bugs/input.project_user_select', status=404)
@@ -351,28 +346,26 @@ class TestFunctionalController(TrackerTestController):
ticket_view = self.new_ticket(summary='First Ticket').follow()
ticket_view = self.new_ticket(summary='Second Ticket').follow()
M.MonQTask.run_ready()
- first_ticket = tm.Ticket.query.find({
- 'summary': 'First Ticket'}).first()
- second_ticket = tm.Ticket.query.find({
- 'summary': 'Second Ticket'}).first()
+ first_ticket = tm.Ticket.query.find({'summary': 'First Ticket'}).first()
+ second_ticket = tm.Ticket.query.find({'summary': 'Second Ticket'}).first()
r = self.app.get('/p/test/bugs/edit/?q=ticket')
self.app.post('/p/test/bugs/update_tickets', {
- '__search': '',
- '__ticket_ids': [first_ticket._id],
- '_milestone': '2.0',
- })
+ '__search': '',
+ '__ticket_ids': [first_ticket._id],
+ '_milestone': '2.0',
+ })
M.MonQTask.run_ready()
r = self.app.get('/p/test/bugs/1/')
assert '<li><strong>Milestone</strong>: 1.0 --> 2.0</li>' in r
r = self.app.get('/p/test/bugs/2/')
assert '<li><strong>Milestone</strong>: 1.0 --> 2.0</li>' not in r
self.app.post('/p/test/bugs/update_tickets', {
- '__search': '',
- '__ticket_ids': (
- first_ticket._id,
- second_ticket._id),
- '_milestone': '1.0',
- })
+ '__search': '',
+ '__ticket_ids': (
+ first_ticket._id,
+ second_ticket._id),
+ '_milestone': '1.0',
+ })
M.MonQTask.run_ready()
r = self.app.get('/p/test/bugs/1/')
assert '<li><strong>Milestone</strong>: 2.0 --> 1.0</li>' in r
@@ -380,12 +373,12 @@ class TestFunctionalController(TrackerTestController):
assert '<li><strong>Milestone</strong>: 2.0 --> 1.0</li>' not in r
self.app.post('/p/test/bugs/update_tickets', {
- '__search': '',
- '__ticket_ids': (
- first_ticket._id,
- second_ticket._id),
- 'status': 'accepted',
- })
+ '__search': '',
+ '__ticket_ids': (
+ first_ticket._id,
+ second_ticket._id),
+ 'status': 'accepted',
+ })
M.MonQTask.run_ready()
r = self.app.get('/p/test/bugs/1/')
assert '<li><strong>Status</strong>: open --> accepted</li>' in r
@@ -401,13 +394,13 @@ class TestFunctionalController(TrackerTestController):
ticket2 = tm.Ticket.query.get(summary='Ticket2')
ticket3 = tm.Ticket.query.get(summary='Ticket3')
self.app.post('/p/test/bugs/update_tickets', {
- '__search': '',
- '__ticket_ids': (
- ticket1._id,
- ticket2._id,
- ticket3._id),
- 'labels': 'tag2, tag3',
- })
+ '__search': '',
+ '__ticket_ids': (
+ ticket1._id,
+ ticket2._id,
+ ticket3._id),
+ 'labels': 'tag2, tag3',
+ })
M.MonQTask.run_ready()
ticket1 = tm.Ticket.query.get(summary='Ticket1')
@@ -434,20 +427,18 @@ class TestFunctionalController(TrackerTestController):
self.new_ticket(summary='Second Custom')
M.MonQTask.run_ready()
- ticket1 = tm.Ticket.query.find({
- 'summary': 'First Custom'}).first()
- ticket2 = tm.Ticket.query.find({
- 'summary': 'Second Custom'}).first()
+ ticket1 = tm.Ticket.query.find({'summary': 'First Custom'}).first()
+ ticket2 = tm.Ticket.query.find({'summary': 'Second Custom'}).first()
ticket2.custom_fields._major = None
ticket2.commit()
self.app.post('/p/test/bugs/update_tickets', {
- '__search': '',
- '__ticket_ids': (
- ticket1._id,
- ticket2._id,),
- 'status': 'accepted',
- '_major': 'False'
- })
+ '__search': '',
+ '__ticket_ids': (
+ ticket1._id,
+ ticket2._id,),
+ 'status': 'accepted',
+ '_major': 'False'
+ })
M.MonQTask.run_ready()
r = self.app.get('/p/test/bugs/1/')
assert '<li><strong>Major</strong>: True --> False</li>' in r
@@ -461,48 +452,44 @@ class TestFunctionalController(TrackerTestController):
assert_equal(ticket2.custom_fields._major, False)
self.app.post('/p/test/bugs/update_tickets', {
- '__search': '',
- '__ticket_ids': (
- ticket1._id,
- ticket2._id,),
- 'status': 'accepted',
- '_major': 'True'
- })
+ '__search': '',
+ '__ticket_ids': (
+ ticket1._id,
+ ticket2._id,),
+ 'status': 'accepted',
+ '_major': 'True'
+ })
M.MonQTask.run_ready()
r = self.app.get('/p/test/bugs/1/')
assert '<li><strong>Major</strong>: False --> True</li>' in r
r = self.app.get('/p/test/bugs/2/')
assert '<li><strong>Major</strong>: False --> True</li>' in r
- ticket1 = tm.Ticket.query.find({
- 'summary': 'First Custom'}).first()
- ticket2 = tm.Ticket.query.find({
- 'summary': 'Second Custom'}).first()
+ ticket1 = tm.Ticket.query.find({'summary': 'First Custom'}).first()
+ ticket2 = tm.Ticket.query.find({'summary': 'Second Custom'}).first()
assert_equal(ticket1.custom_fields._major, True)
assert_equal(ticket2.custom_fields._major, True)
self.app.post('/p/test/bugs/update_tickets', {
- '__search': '',
- '__ticket_ids': (
- ticket2._id,),
- '_major': 'False'
- })
+ '__search': '',
+ '__ticket_ids': (
+ ticket2._id,),
+ '_major': 'False'
+ })
M.MonQTask.run_ready()
ticket2 = tm.Ticket.query.find({
'summary': 'Second Custom'}).first()
assert_equal(ticket2.custom_fields._major, False)
self.app.post('/p/test/bugs/update_tickets', {
- '__search': '',
- '__ticket_ids': (
- ticket1._id,
- ticket2._id,),
- 'status': 'accepted',
- '_major': ''
- })
+ '__search': '',
+ '__ticket_ids': (
+ ticket1._id,
+ ticket2._id,),
+ 'status': 'accepted',
+ '_major': ''
+ })
M.MonQTask.run_ready()
- ticket1 = tm.Ticket.query.find({
- 'summary': 'First Custom'}).first()
- ticket2 = tm.Ticket.query.find({
- 'summary': 'Second Custom'}).first()
+ ticket1 = tm.Ticket.query.find({'summary': 'First Custom'}).first()
+ ticket2 = tm.Ticket.query.find({'summary': 'Second Custom'}).first()
assert_equal(ticket1.custom_fields._major, True)
assert_equal(ticket2.custom_fields._major, False)
@@ -534,61 +521,53 @@ class TestFunctionalController(TrackerTestController):
self.new_ticket(summary='First', **kw)
self.new_ticket(summary='Second')
M.MonQTask.run_ready()
- ticket1 = tm.Ticket.query.find({
- 'summary': 'First'}).first()
- ticket2 = tm.Ticket.query.find({
- 'summary': 'Second'}).first()
+ ticket1 = tm.Ticket.query.find({'summary': 'First'}).first()
+ ticket2 = tm.Ticket.query.find({'summary': 'Second'}).first()
self.app.post('/p/test/bugs/update_tickets', {
- '__search': '',
- '__ticket_ids': (
- ticket1._id,
- ticket2._id,),
- 'private': False
- })
+ '__search': '',
+ '__ticket_ids': (
+ ticket1._id,
+ ticket2._id,),
+ 'private': False
+ })
M.MonQTask.run_ready()
r = self.app.get('/p/test/bugs/1/')
assert '<li><strong>Private</strong>: Yes --> No</li>' in r
r = self.app.get('/p/test/bugs/2/')
assert '<li><strong>Private</strong>: No --> Yes</li>' not in r
- ticket1 = tm.Ticket.query.find({
- 'summary': 'First'}).first()
- ticket2 = tm.Ticket.query.find({
- 'summary': 'Second'}).first()
+ ticket1 = tm.Ticket.query.find({'summary': 'First'}).first()
+ ticket2 = tm.Ticket.query.find({'summary': 'Second'}).first()
assert_equal(ticket1.private, False)
assert_equal(ticket2.private, False)
self.app.post('/p/test/bugs/update_tickets', {
- '__search': '',
- '__ticket_ids': (
- ticket1._id,
- ticket2._id,),
- 'private': True
- })
+ '__search': '',
+ '__ticket_ids': (
+ ticket1._id,
+ ticket2._id,),
+ 'private': True
+ })
M.MonQTask.run_ready()
r = self.app.get('/p/test/bugs/1/')
assert '<li><strong>Private</strong>: No --> Yes</li>' in r
r = self.app.get('/p/test/bugs/2/')
assert '<li><strong>Private</strong>: No --> Yes</li>' in r
- ticket1 = tm.Ticket.query.find({
- 'summary': 'First'}).first()
- ticket2 = tm.Ticket.query.find({
- 'summary': 'Second'}).first()
+ ticket1 = tm.Ticket.query.find({'summary': 'First'}).first()
+ ticket2 = tm.Ticket.query.find({'summary': 'Second'}).first()
assert_equal(ticket1.private, True)
assert_equal(ticket2.private, True)
ticket2.private = False
self.app.post('/p/test/bugs/update_tickets', {
- '__search': '',
- '__ticket_ids': (
- ticket1._id,
- ticket2._id,),
- 'private': ''
- })
+ '__search': '',
+ '__ticket_ids': (
+ ticket1._id,
+ ticket2._id,),
+ 'private': ''
+ })
M.MonQTask.run_ready()
- ticket1 = tm.Ticket.query.find({
- 'summary': 'First'}).first()
- ticket2 = tm.Ticket.query.find({
- 'summary': 'Second'}).first()
+ ticket1 = tm.Ticket.query.find({'summary': 'First'}).first()
+ ticket2 = tm.Ticket.query.find({'summary': 'Second'}).first()
assert_equal(ticket1.private, True)
assert_equal(ticket2.private, False)
@@ -597,8 +576,7 @@ class TestFunctionalController(TrackerTestController):
assert_true('<label class="simple">Private:</label> No' in ticket_view)
ticket_view = self.new_ticket(summary='Private Ticket',
private=True).follow()
- assert_true(
- '<label class="simple">Private:</label> Yes' in ticket_view)
+ assert_true('<label class="simple">Private:</label> Yes' in ticket_view)
M.MonQTask.run_ready()
# Creator sees private ticket on list page...
index_response = self.app.get('/p/test/bugs/')
@@ -645,8 +623,7 @@ class TestFunctionalController(TrackerTestController):
'ticket_form.private': 'on',
})
response = self.app.get('/bugs/1/')
- assert_true(
- '<li><strong>private</strong>: No --> Yes</li>' in response)
+ assert_true('<li><strong>private</strong>: No --> Yes</li>' in response)
@td.with_tool('test', 'Tickets', 'doc-bugs')
def test_two_trackers(self):
@@ -722,8 +699,7 @@ class TestFunctionalController(TrackerTestController):
response = self.app.get('/bugs/1/')
assert_true('yellow' in response)
assert_true(u'greén' in response)
- assert_true(
- '<li><strong>labels</strong>: --> yellow, greén</li>' in response)
+ assert_true('<li><strong>labels</strong>: --> yellow, greén</li>' in response)
self.app.post('/bugs/1/update_ticket', {
'summary': 'zzz',
'description': 'bbb',
@@ -735,8 +711,7 @@ class TestFunctionalController(TrackerTestController):
})
response = self.app.get('/bugs/1/')
assert_true('yellow' in response)
- assert_true(
- '<li><strong>labels</strong>: yellow, greén --> yellow</li>' in response)
+ assert_true('<li><strong>labels</strong>: yellow, greén --> yellow</li>' in response)
self.app.post('/bugs/1/update_ticket', {
'summary': 'zzz',
'description': 'bbb',
@@ -747,8 +722,7 @@ class TestFunctionalController(TrackerTestController):
'comment': ''
})
response = self.app.get('/bugs/1/')
- assert_true(
- '<li><strong>labels</strong>: yellow --> </li>' in response)
+ assert_true('<li><strong>labels</strong>: yellow --> </li>' in response)
def test_new_attachment(self):
file_name = 'test_root.py'
@@ -788,14 +762,12 @@ class TestFunctionalController(TrackerTestController):
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = 'test comment'
self.app.post(f['action'].encode('utf-8'), params=params,
headers={'Referer': '/bugs/1/'.encode("utf-8")})
r = self.app.get('/bugs/1/', dict(page=1))
- post_link = str(
- r.html.find('div', {'class': 'edit_post_form reply'}).find('form')['action'])
+ post_link = str(r.html.find('div', {'class': 'edit_post_form reply'}).find('form')['action'])
self.app.post(post_link + 'attach',
upload_files=[('file_info', 'test.txt', 'HiThere!')])
r = self.app.get('/bugs/1/', dict(page=1))
@@ -812,8 +784,7 @@ class TestFunctionalController(TrackerTestController):
ticket_editor = self.app.post('/bugs/1/update_ticket', {
'summary': 'zzz'
}, upload_files=[upload]).follow()
- download = self.app.get(
- str(ticket_editor.html.findAll('form')[1].findAll('a')[7]['href']))
+ download = self.app.get(str(ticket_editor.html.findAll('form')[1].findAll('a')[7]['href']))
assert_equal(download.body, file_data)
def test_two_attachments(self):
@@ -922,10 +893,8 @@ class TestFunctionalController(TrackerTestController):
self.new_ticket(summary=summary)
response = self.app.get('/p/test/bugs/1/')
assert response.html.find('input', {'name': 'ticket_form.summary'})
- assert response.html.find(
- 'select', {'name': 'ticket_form.assigned_to'})
- assert response.html.find(
- 'textarea', {'name': 'ticket_form.description'})
+ assert response.html.find('select', {'name': 'ticket_form.assigned_to'})
+ assert response.html.find('textarea', {'name': 'ticket_form.description'})
assert response.html.find('select', {'name': 'ticket_form.status'})
assert response.html.find('select', {'name': 'ticket_form._milestone'})
assert response.html.find('input', {'name': 'ticket_form.labels'})
@@ -935,15 +904,13 @@ class TestFunctionalController(TrackerTestController):
summary = 'test default assignment'
self.new_ticket(summary=summary)
response = self.app.get('/p/test/bugs/1/')
- assert 'nobody' in str(
- response.html.find('div', {'class': 'grid-5 ticket-assigned-to'}))
+ assert 'nobody' in str(response.html.find('div', {'class': 'grid-5 ticket-assigned-to'}))
def test_assign_ticket(self):
summary = 'test assign ticket'
self.new_ticket(summary=summary)
response = self.app.get('/p/test/bugs/1/')
- assert 'nobody' in str(
- response.html.find('div', {'class': 'grid-5 ticket-assigned-to'}))
+ assert 'nobody' in str(response.html.find('div', {'class': 'grid-5 ticket-assigned-to'}))
response = self.app.post('/bugs/1/update_ticket', {
'summary': 'zzz',
'description': 'bbb',
@@ -954,7 +921,7 @@ class TestFunctionalController(TrackerTestController):
'comment': ''
}).follow()
assert 'test-admin' in str(response.html.find('div',
- {'class': 'grid-5 ticket-assigned-to'}))
+ {'class': 'grid-5 ticket-assigned-to'}))
assert '<li><strong>summary</strong>: test assign ticket --> zzz' in response
assert '<li><strong>status</strong>: open --> ccc' in response
@@ -975,8 +942,7 @@ class TestFunctionalController(TrackerTestController):
kw = {'custom_fields._priority': 'normal',
'custom_fields._category': 'helloworld',
'custom_fields._code_review': 'test-admin'}
- ticket_view = self.new_ticket(
- summary='test custom fields', **kw).follow()
+ ticket_view = self.new_ticket(summary='test custom fields', **kw).follow()
assert 'Priority:' in ticket_view
assert 'normal' in ticket_view
assert 'Test Admin' in ticket_view
@@ -996,8 +962,7 @@ class TestFunctionalController(TrackerTestController):
r = self.app.get('/bugs/new/')
assert '<option value="test select">test select</option>' in r
kw = {'custom_fields._testselect': 'test select'}
- ticket_view = self.new_ticket(
- summary='test select custom fields', **kw).follow()
+ ticket_view = self.new_ticket(summary='test select custom fields', **kw).follow()
assert '<option selected value="test select">test select</option>' in ticket_view
def test_select_custom_field_unicode(self):
@@ -1044,8 +1009,7 @@ class TestFunctionalController(TrackerTestController):
r = self.app.post('/admin/bugs/set_custom_fields',
params=variable_encode(params))
kw = {'custom_fields._number': ''}
- ticket_view = self.new_ticket(
- summary='test custom fields', **kw).follow()
+ ticket_view = self.new_ticket(summary='test custom fields', **kw).follow()
assert '<strong>Number</strong>: -->' not in ticket_view
ticket_view = self.app.post('/bugs/1/update_ticket', params={
'summary': 'zzz',
@@ -1170,10 +1134,10 @@ class TestFunctionalController(TrackerTestController):
form['ticket_form.custom_fields._priority'] = 'urgent'
form['ticket_form.custom_fields._category'] = 'bugs'
error_form = form.submit()
- assert_equal(
- error_form.forms[1]['ticket_form.custom_fields._priority'].value, 'urgent')
- assert_equal(
- error_form.forms[1]['ticket_form.custom_fields._category'].value, 'bugs')
+ assert_equal(error_form.forms[1]['ticket_form.custom_fields._priority'].value,
+ 'urgent')
+ assert_equal(error_form.forms[1]['ticket_form.custom_fields._category'].value,
+ 'bugs')
# Test edit ticket form
self.new_ticket(summary='Test ticket')
response = self.app.get('/bugs/1/')
@@ -1185,10 +1149,10 @@ class TestFunctionalController(TrackerTestController):
form['ticket_form.custom_fields._priority'] = 'urgent'
form['ticket_form.custom_fields._category'] = 'bugs'
error_form = form.submit()
- assert_equal(
- error_form.forms[1]['ticket_form.custom_fields._priority'].value, 'urgent')
- assert_equal(
- error_form.forms[1]['ticket_form.custom_fields._category'].value, 'bugs')
+ assert_equal(error_form.forms[1]['ticket_form.custom_fields._priority'].value,
+ 'urgent')
+ assert_equal(error_form.forms[1]['ticket_form.custom_fields._category'].value,
+ 'bugs')
def test_new_ticket_validation(self):
summary = 'ticket summary'
@@ -1203,15 +1167,12 @@ class TestFunctionalController(TrackerTestController):
assert error_message
assert (error_message.string == 'You must provide a Title' or
error_message.string == 'Missing value')
- assert error_message.findPreviousSibling(
- 'input').get('name') == 'ticket_form.summary'
+ assert error_message.findPreviousSibling('input').get('name') == 'ticket_form.summary'
# set a summary, submit, and check for success
error_form.forms[1]['ticket_form.summary'] = summary
success = error_form.forms[1].submit().follow().html
- assert success.findAll('form')[1].get(
- 'action') == '/p/test/bugs/1/update_ticket_from_widget'
- assert success.find('input', {'name': 'ticket_form.summary'})[
- 'value'] == summary
+ assert success.findAll('form')[1].get('action') == '/p/test/bugs/1/update_ticket_from_widget'
+ assert success.find('input', {'name': 'ticket_form.summary'})['value'] == summary
def test_edit_ticket_validation(self):
old_summary = 'edit ticket test'
@@ -1219,8 +1180,7 @@ class TestFunctionalController(TrackerTestController):
self.new_ticket(summary=old_summary)
response = self.app.get('/bugs/1/')
# check that existing form is valid
- assert response.html.find(
- 'input', {'name': 'ticket_form.summary'})['value'] == old_summary
+ assert response.html.find('input', {'name': 'ticket_form.summary'})['value'] == old_summary
assert not response.html.find('div', {'class': 'error'})
form = response.forms[1]
# try submitting with no summary set and check for error message
@@ -1229,17 +1189,14 @@ class TestFunctionalController(TrackerTestController):
error_message = error_form.html.find('div', {'class': 'error'})
assert error_message
assert error_message.string == 'You must provide a Title'
- assert error_message.findPreviousSibling(
- 'input').get('name') == 'ticket_form.summary'
+ assert error_message.findPreviousSibling('input').get('name') == 'ticket_form.summary'
# set a summary, submit, and check for success
error_form.forms[1]['ticket_form.summary'] = new_summary
r = error_form.forms[1].submit()
assert r.status_int == 302, r.showbrowser()
success = r.follow().html
- assert success.findAll('form')[1].get(
- 'action') == '/p/test/bugs/1/update_ticket_from_widget'
- assert success.find('input', {'name': 'ticket_form.summary'})[
- 'value'] == new_summary
+ assert success.findAll('form')[1].get('action') == '/p/test/bugs/1/update_ticket_from_widget'
+ assert success.find('input', {'name': 'ticket_form.summary'})['value'] == new_summary
def test_home(self):
self.new_ticket(summary='test first ticket')
@@ -1284,7 +1241,7 @@ class TestFunctionalController(TrackerTestController):
ThreadLocalORMSession.flush_all()
for ext in ['', '.rss', '.atom']:
assert '<title>test first ticket</title>' in \
- self.app.get('/p/test/bugs/search_feed%s?q=test' % ext)
+ self.app.get('/p/test/bugs/search_feed%s?q=test' % ext)
def test_search_current_user(self):
self.new_ticket(summary='test first ticket')
@@ -1361,8 +1318,7 @@ class TestFunctionalController(TrackerTestController):
'old_summary': '',
'sort': ''}).follow()
r = self.app.get('/bugs/')
- assert sidebar_contains(
- r, 'This will be truncated because it is too long to show in the sidebar ...')
+ assert sidebar_contains(r, 'This will be truncated because it is too long to show in the sidebar ...')
def test_edit_saved_search(self):
r = self.app.get('/admin/bugs/bins/')
@@ -1392,15 +1348,13 @@ class TestFunctionalController(TrackerTestController):
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = post_content
r = self.app.post(f['action'].encode('utf-8'), params=params,
headers={'Referer': '/bugs/1/'.encode("utf-8")})
r = self.app.get('/bugs/1/', dict(page=1))
assert_true(post_content in r)
- assert_true(
- len(r.html.findAll(attrs={'class': 'discussion-post'})) == 1)
+ assert_true(len(r.html.findAll(attrs={'class': 'discussion-post'})) == 1)
new_summary = 'old ticket'
for f in ticket_view.html.findAll('form'):
@@ -1410,15 +1364,13 @@ class TestFunctionalController(TrackerTestController):
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params['ticket_form.summary'] = new_summary
r = self.app.post(f['action'].encode('utf-8'), params=params,
headers={'Referer': '/bugs/1/'.encode("utf-8")})
r = self.app.get('/bugs/1/', dict(page=1))
assert_true(summary + ' --> ' + new_summary in r)
- assert_true(
- len(r.html.findAll(attrs={'class': 'discussion-post'})) == 2)
+ assert_true(len(r.html.findAll(attrs={'class': 'discussion-post'})) == 2)
def test_discussion_paging(self):
summary = 'test discussion paging'
@@ -1431,8 +1383,7 @@ class TestFunctionalController(TrackerTestController):
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = post_content
r = self.app.post(f['action'].encode('utf-8'), params=params,
headers={'Referer': '/bugs/1/'.encode("utf-8")})
@@ -1460,8 +1411,7 @@ class TestFunctionalController(TrackerTestController):
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = post_content
self.app.post(f['action'].encode('utf-8'), params=params,
headers={'Referer': '/bugs/1/'.encode("utf-8")})
@@ -1469,15 +1419,13 @@ class TestFunctionalController(TrackerTestController):
post = M.Post.query.find().first()
assert '/p/test/bugs/1/?limit=25#' + post.slug in r
r = self.app.get('/bugs/1/')
- post_link = str(
- r.html.find('div', {'class': 'edit_post_form reply'}).find('form')['action'])
+ post_link = str(r.html.find('div', {'class': 'edit_post_form reply'}).find('form')['action'])
post_form = r.html.find('form', {'action': post_link + 'reply'})
params = dict()
inputs = post_form.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[post_form.find('textarea')['name']] = 'Tis a reply'
r = self.app.post(post_link + 'reply',
params=params,
@@ -1497,11 +1445,10 @@ class TestFunctionalController(TrackerTestController):
M.MonQTask.run_ready()
ThreadLocalORMSession.flush_all()
response = self.app.get('/p/test/bugs/?sort=summary+asc')
- ticket_rows = response.html.find(
- 'table', {'class': 'ticket-list'}).find('tbody')
+ ticket_rows = response.html.find('table', {'class': 'ticket-list'}).find('tbody')
assert_in('test first ticket', str(ticket_rows))
assert_in('test second ticket', str(ticket_rows))
- edit_link = response.html.find('a',{'title':'Bulk Edit'})
+ edit_link = response.html.find('a', {'title': 'Bulk Edit'})
expected_link = "/p/test/bugs/edit/?q=%21status%3Awont-fix+%26%26+%21status%3Aclosed&sort=snippet_s+asc&limit=25&filter=&page=0"
assert_equal(expected_link, edit_link['href'])
response = self.app.get(edit_link['href'])
@@ -1519,14 +1466,12 @@ class TestFunctionalController(TrackerTestController):
ThreadLocalORMSession.flush_all()
M.MonQTask.run_ready()
ThreadLocalORMSession.flush_all()
- response = self.app.get(
- '/p/test/bugs/milestone/1.0/?sort=ticket_num+asc')
- ticket_rows = response.html.find(
- 'table', {'class': 'ticket-list'}).find('tbody')
+ response = self.app.get('/p/test/bugs/milestone/1.0/?sort=ticket_num+asc')
+ ticket_rows = response.html.find('table', {'class': 'ticket-list'}).find('tbody')
assert_in('test first ticket', str(ticket_rows))
assert_in('test second ticket', str(ticket_rows))
assert_in('test third ticket', str(ticket_rows))
- edit_link = response.html.find('a',{'title':'Bulk Edit'})
+ edit_link = response.html.find('a', {'title': 'Bulk Edit'})
expected_link = "/p/test/bugs/edit/?q=_milestone%3A1.0&sort=ticket_num_i+asc&limit=25&filter=&page=0"
assert_equal(expected_link, edit_link['href'])
response = self.app.get(edit_link['href'])
@@ -1538,18 +1483,16 @@ class TestFunctionalController(TrackerTestController):
def test_bulk_edit_search(self):
self.new_ticket(summary='test first ticket', status='open')
self.new_ticket(summary='test second ticket', status='open')
- self.new_ticket(summary='test third ticket',
- status='closed', _milestone='1.0')
+ self.new_ticket(summary='test third ticket', status='closed', _milestone='1.0')
ThreadLocalORMSession.flush_all()
M.MonQTask.run_ready()
ThreadLocalORMSession.flush_all()
response = self.app.get('/p/test/bugs/search/?q=status%3Aopen')
- ticket_rows = response.html.find(
- 'table', {'class': 'ticket-list'}).find('tbody')
+ ticket_rows = response.html.find('table', {'class': 'ticket-list'}).find('tbody')
assert_in('test first ticket', str(ticket_rows))
assert_in('test second ticket', str(ticket_rows))
assert_false('test third ticket' in str(ticket_rows))
- edit_link = response.html.find('a',{'title':'Bulk Edit'})
+ edit_link = response.html.find('a', {'title': 'Bulk Edit'})
expected_link = "/p/test/bugs/edit/?q=status%3Aopen&limit=25&filter=%7B%7D&page=0"
assert_equal(expected_link, edit_link['href'])
response = self.app.get(edit_link['href'])
@@ -1579,16 +1522,14 @@ class TestFunctionalController(TrackerTestController):
open_status_names='aa bb',
closed_status_names='cc',
)
- self.app.post(
- '/admin/bugs/set_custom_fields',
- params=variable_encode(params))
+ self.app.post('/admin/bugs/set_custom_fields',
+ params=variable_encode(params))
self.new_ticket(summary='test new milestone', _milestone='2.0',
**{'custom_fields._releases': '1.0-beta'})
ThreadLocalORMSession.flush_all()
M.MonQTask.run_ready()
ThreadLocalORMSession.flush_all()
- email = M.MonQTask.query.find(
- dict(task_name='allura.tasks.mail_tasks.sendmail')).first()
+ email = M.MonQTask.query.find(dict(task_name='allura.tasks.mail_tasks.sendmail')).first()
assert_in('**Releases:** 1.0-beta', email.kwargs.text)
assert_in('**Milestone:** 2.0', email.kwargs.text)
@@ -1611,22 +1552,20 @@ class TestFunctionalController(TrackerTestController):
second_ticket.subscribe(user=second_user)
M.MonQTask.query.remove()
self.app.post('/p/test/bugs/update_tickets', {
- '__search': '',
- '__ticket_ids': (
- first_ticket._id,
- second_ticket._id,
- third_ticket._id),
- 'status': 'accepted',
- '_milestone': '2.0',
- 'assigned_to': 'test-admin'})
+ '__search': '',
+ '__ticket_ids': (
+ first_ticket._id,
+ second_ticket._id,
+ third_ticket._id),
+ 'status': 'accepted',
+ '_milestone': '2.0',
+ 'assigned_to': 'test-admin'})
M.MonQTask.run_ready()
- emails = M.MonQTask.query.find(
- dict(task_name='allura.tasks.mail_tasks.sendmail')).all()
+ emails = M.MonQTask.query.find(dict(task_name='allura.tasks.mail_tasks.sendmail')).all()
assert_equal(len(emails), 3)
for email in emails:
- assert_equal(email.kwargs.subject,
- '[test:bugs] Mass edit changes by Test Admin')
+ assert_equal(email.kwargs.subject, '[test:bugs] Mass edit changes by Test Admin')
first_user_email = M.MonQTask.query.find({
'task_name': 'allura.tasks.mail_tasks.sendmail',
'kwargs.destinations': str(first_user._id)
@@ -1692,17 +1631,15 @@ class TestFunctionalController(TrackerTestController):
ticket = tm.Ticket.query.get(summary='test first ticket')
M.MonQTask.query.remove()
self.app.post('/p/test/bugs/update_tickets', {
- '__search': '',
- '__ticket_ids': [ticket._id],
- 'status': 'accepted'})
+ '__search': '',
+ '__ticket_ids': [ticket._id],
+ 'status': 'accepted'})
M.MonQTask.run_ready()
- emails = M.MonQTask.query.find(
- dict(task_name='allura.tasks.mail_tasks.sendmail')).all()
+ emails = M.MonQTask.query.find(dict(task_name='allura.tasks.mail_tasks.sendmail')).all()
# one for admin and one for monitoring email
assert_equal(len(emails), 2)
for email in emails:
- assert_equal(email.kwargs.subject,
- '[test:bugs] Mass edit changes by Test Admin')
+ assert_equal(email.kwargs.subject, '[test:bugs] Mass edit changes by Test Admin')
admin = M.User.by_username('test-admin')
admin_email = M.MonQTask.query.find({
'task_name': 'allura.tasks.mail_tasks.sendmail',
@@ -1726,27 +1663,23 @@ class TestFunctionalController(TrackerTestController):
'TicketMonitoringEmail': 'monitoring@email.com',
'TicketMonitoringType': 'AllPublicTicketChanges',
})
- self.new_ticket(summary='test first ticket',
- status='open', _milestone='2.0')
- self.new_ticket(summary='test second ticket',
- status='open', private=True)
+ self.new_ticket(summary='test first ticket', status='open', _milestone='2.0')
+ self.new_ticket(summary='test second ticket', status='open', private=True)
ThreadLocalORMSession.flush_all()
M.MonQTask.run_ready()
ThreadLocalORMSession.flush_all()
tickets = tm.Ticket.query.find(dict(status='open')).all()
M.MonQTask.query.remove()
self.app.post('/p/test/bugs/update_tickets', {
- '__search': '',
- '__ticket_ids': [t._id for t in tickets],
- 'status': 'accepted'})
+ '__search': '',
+ '__ticket_ids': [t._id for t in tickets],
+ 'status': 'accepted'})
M.MonQTask.run_ready()
- emails = M.MonQTask.query.find(
- dict(task_name='allura.tasks.mail_tasks.sendmail')).all()
+ emails = M.MonQTask.query.find(dict(task_name='allura.tasks.mail_tasks.sendmail')).all()
# one for admin and one for monitoring email
assert_equal(len(emails), 2)
for email in emails:
- assert_equal(email.kwargs.subject,
- '[test:bugs] Mass edit changes by Test Admin')
+ assert_equal(email.kwargs.subject, '[test:bugs] Mass edit changes by Test Admin')
admin = M.User.by_username('test-admin')
admin_email = M.MonQTask.query.find({
'task_name': 'allura.tasks.mail_tasks.sendmail',
@@ -1771,26 +1704,22 @@ class TestFunctionalController(TrackerTestController):
'TicketMonitoringEmail': 'monitoring@email.com',
'TicketMonitoringType': 'AllPublicTicketChanges',
})
- self.new_ticket(summary='test first ticket',
- status='open', private=True)
- self.new_ticket(summary='test second ticket',
- status='open', private=True)
+ self.new_ticket(summary='test first ticket', status='open', private=True)
+ self.new_ticket(summary='test second ticket', status='open', private=True)
ThreadLocalORMSession.flush_all()
M.MonQTask.run_ready()
ThreadLocalORMSession.flush_all()
tickets = tm.Ticket.query.find(dict(status='open')).all()
M.MonQTask.query.remove()
self.app.post('/p/test/bugs/update_tickets', {
- '__search': '',
- '__ticket_ids': [t._id for t in tickets],
- 'status': 'accepted'})
+ '__search': '',
+ '__ticket_ids': [t._id for t in tickets],
+ 'status': 'accepted'})
M.MonQTask.run_ready()
- emails = M.MonQTask.query.find(
- dict(task_name='allura.tasks.mail_tasks.sendmail')).all()
+ emails = M.MonQTask.query.find(dict(task_name='allura.tasks.mail_tasks.sendmail')).all()
assert_equal(len(emails), 1) # only admin email sent
for email in emails:
- assert_equal(email.kwargs.subject,
- '[test:bugs] Mass edit changes by Test Admin')
+ assert_equal(email.kwargs.subject, '[test:bugs] Mass edit changes by Test Admin')
admin = M.User.by_username('test-admin')
admin_email = M.MonQTask.query.find({
'task_name': 'allura.tasks.mail_tasks.sendmail',
@@ -1864,22 +1793,19 @@ class TestFunctionalController(TrackerTestController):
# invalid vote
r = self.app.post('/bugs/1/vote', dict(vote='invalid'))
- expected_resp = json.dumps(
- dict(status='error', votes_up=0, votes_down=0, votes_percent=0))
+ expected_resp = json.dumps(dict(status='error', votes_up=0, votes_down=0, votes_percent=0))
assert r.response.content == expected_resp
# vote up
r = self.app.post('/bugs/1/vote', dict(vote='u'))
- expected_resp = json.dumps(
- dict(status='ok', votes_up=1, votes_down=0, votes_percent=100))
+ expected_resp = json.dumps(dict(status='ok', votes_up=1, votes_down=0, votes_percent=100))
assert r.response.content == expected_resp
# vote down by another user
r = self.app.post('/bugs/1/vote', dict(vote='d'),
extra_environ=dict(username='test-user-0'))
- expected_resp = json.dumps(
- dict(status='ok', votes_up=1, votes_down=1, votes_percent=50))
+ expected_resp = json.dumps(dict(status='ok', votes_up=1, votes_down=1, votes_percent=50))
assert r.response.content == expected_resp
# make sure that on the page we see the same result
@@ -1953,8 +1879,7 @@ class TestFunctionalController(TrackerTestController):
assert 'Private ticket title' in r
assert '<label class="simple">Private:</label> Yes' in r, 'Ticket is not private'
# ... and can't see 'Edit' link
- assert r.html.find('a', {'class': 'edit_ticket'}
- ) is None, "Found 'Edit' link"
+ assert r.html.find('a', {'class': 'edit_ticket'}) is None, "Found 'Edit' link"
# ... and can't actually edit it
self.app.post('/bugs/1/update_ticket', {'summary': 'should fail'},
extra_environ=env, status=403)
@@ -2031,8 +1956,7 @@ class TestFunctionalController(TrackerTestController):
r = self.app.get('/p/test/bugs/1/move')
trackers = r.html.find('select', {'name': 'tracker'}).findAll('option')
trackers = set([t.text for t in trackers])
- expected = set(
- ['test/bugs', 'test/bugs2', 'test2/bugs', 'test2/bugs2'])
+ expected = set(['test/bugs', 'test/bugs2', 'test2/bugs', 'test2/bugs2'])
assert trackers == expected, trackers
p = M.Project.query.get(shortname='test2')
@@ -2040,8 +1964,7 @@ class TestFunctionalController(TrackerTestController):
r = self.app.post('/p/test/bugs/1/move/',
params={'tracker': str(tracker.config._id)}).follow()
assert_equal(r.request.path, '/p/test2/bugs2/1/')
- summary = r.html.findAll(
- 'h2', {'class': 'dark title'})[0].contents[0].strip()
+ summary = r.html.findAll('h2', {'class': 'dark title'})[0].contents[0].strip()
assert_equal(summary, '#1 test')
ac_id = tracker.config._id
ticket = tm.Ticket.query.find({
@@ -2087,8 +2010,7 @@ class TestFunctionalController(TrackerTestController):
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = post_content
r = self.app.post(f['action'].encode('utf-8'), params=params,
headers={'Referer': '/p/test2/bugs2/1/'.encode("utf-8")})
@@ -2218,8 +2140,7 @@ class TestFunctionalController(TrackerTestController):
upload_files=[upload])
# attach a txt file to the comment
r = self.app.get('/p/test/bugs/1/')
- post_link = str(
- r.html.find('div', {'class': 'edit_post_form reply'}).find('form')['action'])
+ post_link = str(r.html.find('div', {'class': 'edit_post_form reply'}).find('form')['action'])
r = self.app.post(post_link + 'attach',
upload_files=[('file_info', 'test.txt', 'test')])
# move ticket
@@ -2231,10 +2152,8 @@ class TestFunctionalController(TrackerTestController):
attachs = r.html.findAll('div', attrs={'class': 'attachment_thumb'})
ta = str(attachs[1]) # ticket's attachments
ca = str(attachs[2]) # comment's attachments
- assert_in(
- '<a href="/p/test2/bugs2/1/attachment/neo-icon-set-454545-256x350.png"', ta)
- assert_in(
- '<img src="/p/test2/bugs2/1/attachment/neo-icon-set-454545-256x350.png/thumb"', ta)
+ assert_in('<a href="/p/test2/bugs2/1/attachment/neo-icon-set-454545-256x350.png"', ta)
+ assert_in('<img src="/p/test2/bugs2/1/attachment/neo-icon-set-454545-256x350.png/thumb"', ta)
p = M.Post.query.find().sort('timestamp', 1).first()
assert_in(
'<a href="/p/test2/bugs2/_discuss/thread/%s/%s/attachment/test.txt"' %
@@ -2288,14 +2207,12 @@ class TestFunctionalController(TrackerTestController):
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = 'test comment'
self.app.post(f['action'].encode('utf-8'), params=params,
headers={'Referer': '/bugs/1/'.encode("utf-8")})
r = self.app.get('/bugs/1/', dict(page=1))
- post_link = str(
- r.html.find('div', {'class': 'edit_post_form reply'}).find('form')['action'])
+ post_link = str(r.html.find('div', {'class': 'edit_post_form reply'}).find('form')['action'])
self.app.post(post_link + 'attach',
upload_files=[('file_info', 'test.txt', 'test attach')])
r = self.app.get('/p/test/bugs/1/')
@@ -2305,12 +2222,10 @@ class TestFunctionalController(TrackerTestController):
assert_equal(r['ticket']['discussion_thread_url'],
'http://localhost/rest%s' % discussion_url)
slug = r['ticket']['discussion_thread']['posts'][0]['slug']
- assert_equal(
- r['ticket']['discussion_thread'][
- 'posts'][0]['attachments'][0]['url'],
- 'http://localhost%s%s/attachment/test.txt' % (discussion_url, slug))
- assert_equal(r['ticket']['discussion_thread']['posts']
- [0]['attachments'][0]['bytes'], 11)
+ assert_equal(r['ticket']['discussion_thread']['posts'][0]['attachments'][0]['url'],
+ 'http://localhost%s%s/attachment/test.txt' % (discussion_url, slug))
+ assert_equal(r['ticket']['discussion_thread']['posts'][0]['attachments'][0]['bytes'],
+ 11)
file_name = 'test_root.py'
file_data = file(__file__).read()
@@ -2359,8 +2274,8 @@ class TestFunctionalController(TrackerTestController):
assert query_filter_choices.call_count == 1
assert query_filter_choices.call_args[0][0] == '!status_s:wont-fix && !status_s:closed'
-class TestMilestoneAdmin(TrackerTestController):
+class TestMilestoneAdmin(TrackerTestController):
def _post(self, params, **kw):
params['open_status_names'] = 'aa bb'
params['closed_status_names'] = 'cc'
@@ -2453,7 +2368,7 @@ class TestMilestoneAdmin(TrackerTestController):
dict(label='releases', milestones=[
dict(name='1.1', old_name='1.0')])
])
- assert 'releases'in r
+ assert 'releases' in r
assert '1.0' not in r
assert '1.1' in r
assert tm.Ticket.query.find({
@@ -2470,7 +2385,6 @@ def post_install_hook(app):
class TestEmailMonitoring(TrackerTestController):
-
def __init__(self):
super(TestEmailMonitoring, self).__init__()
self.test_email = 'mailinglist@example.com'
@@ -2573,8 +2487,7 @@ class TestEmailMonitoring(TrackerTestController):
p.notifications_disabled = True
self._set_options()
with patch.object(M.Project.query, 'get') as get:
- get.side_effect = lambda * \
- a, **k: None if 'bugs' in k.get('shortname', '') else p
+ get.side_effect = lambda *a, **k: None if 'bugs' in k.get('shortname', '') else p
self.new_ticket(summary='test')
assert send_simple.call_count == 0, send_simple.call_count
@@ -2586,14 +2499,13 @@ class TestEmailMonitoring(TrackerTestController):
M.MonQTask.run_ready()
email_tasks = M.MonQTask.query.find(
dict(task_name='allura.tasks.mail_tasks.sendsimplemail')).all()
- assert 'Sent from localhost because mailinglist@example.com is subscribed to http://localhost/p/test/bugs/' in email_tasks[
- 0].kwargs['text']
- assert 'a project admin can change settings at http://localhost/p/test/admin/bugs/options' in email_tasks[
- 0].kwargs['text']
+ assert 'Sent from localhost because mailinglist@example.com is subscribed to http://localhost/p/test/bugs/' in \
+ email_tasks[0].kwargs['text']
+ assert 'a project admin can change settings at http://localhost/p/test/admin/bugs/options' in \
+ email_tasks[0].kwargs['text']
class TestCustomUserField(TrackerTestController):
-
def setUp(self):
super(TestCustomUserField, self).setUp()
params = dict(
@@ -2609,8 +2521,7 @@ class TestCustomUserField(TrackerTestController):
def test_blank_user(self):
kw = {'custom_fields._code_review': ''}
- ticket_view = self.new_ticket(
- summary='test custom fields', **kw).follow()
+ ticket_view = self.new_ticket(summary='test custom fields', **kw).follow()
# summary header shows 'nobody'
assert ticket_view.html.findAll('label', 'simple',
text='Code Review:')[1].parent.parent.text == 'Code Review:nobody'
@@ -2633,8 +2544,7 @@ class TestCustomUserField(TrackerTestController):
def test_project_member(self):
kw = {'custom_fields._code_review': 'test-admin'}
- ticket_view = self.new_ticket(
- summary='test custom fields', **kw).follow()
+ ticket_view = self.new_ticket(summary='test custom fields', **kw).follow()
# summary header shows 'nobody'
assert ticket_view.html.findAll('label', 'simple',
text='Code Review:')[1].parent.parent.text == 'Code Review:Test Admin'
@@ -2654,8 +2564,7 @@ class TestCustomUserField(TrackerTestController):
# Populate ProjectUserCombo's select with option we want.
# This is a workaround for tests,
# in real enviroment this is populated via ajax.
- f['ticket_form.custom_fields._code_review'].options = [
- ('test-admin', False)]
+ f['ticket_form.custom_fields._code_review'].options = [('test-admin', False)]
f['ticket_form.custom_fields._code_review'] = 'test-admin'
r = f.submit().follow()
assert '<li><strong>Code Review</strong>: Test Admin' in r
@@ -2669,7 +2578,6 @@ class TestCustomUserField(TrackerTestController):
class TestHelpTextOptions(TrackerTestController):
-
def _set_options(self, new_txt='', search_txt=''):
r = self.app.post('/admin/bugs/set_options', params={
'TicketHelpNew': new_txt,
@@ -2705,7 +2613,6 @@ class TestHelpTextOptions(TrackerTestController):
class test_show_default_fields(TrackerTestController):
-
def test_show_default_fields(self):
r = self.app.get('/admin/bugs/fields')
assert '<td>Ticket Number</td> <td><input type="checkbox" name="ticket_num" checked ></td>' in r
@@ -2741,7 +2648,6 @@ class test_show_default_fields(TrackerTestController):
class TestBulkMove(TrackerTestController):
-
def setUp(self):
super(TestBulkMove, self).setUp()
self.new_ticket(summary='A New Hope')
@@ -2776,11 +2682,9 @@ class TestBulkMove(TrackerTestController):
r = self.app.get('/bugs/move/')
trackers = r.html.find('select', {'name': 'tracker'}).findAll('option')
trackers = set([t.text for t in trackers])
- expected = set(
- ['test/bugs', 'test/bugs2', 'test2/bugs', 'test2/bugs2'])
+ expected = set(['test/bugs', 'test/bugs2', 'test2/bugs', 'test2/bugs2'])
assert_equal(trackers, expected)
- move_btn = r.html.find(
- 'input', attrs={'type': 'submit', 'value': 'Move'})
+ move_btn = r.html.find('input', attrs={'type': 'submit', 'value': 'Move'})
assert move_btn is not None
@td.with_tool('test2', 'Tickets', 'bugs')
@@ -2803,20 +2707,17 @@ class TestBulkMove(TrackerTestController):
ac_id = tracker.config._id
original_ac_id = original_tracker.config._id
moved_tickets = tm.Ticket.query.find({'app_config_id': ac_id}).all()
- original_tickets = tm.Ticket.query.find(
- {'app_config_id': original_ac_id}).all()
+ original_tickets = tm.Ticket.query.find({'app_config_id': original_ac_id}).all()
assert_equal(len(moved_tickets), 2)
assert_equal(len(original_tickets), 1)
for ticket in moved_tickets:
assert_equal(ticket.discussion_thread.app_config_id, ac_id)
- assert_equal(
- ticket.discussion_thread.discussion.app_config_id, ac_id)
+ assert_equal(ticket.discussion_thread.discussion.app_config_id, ac_id)
post = ticket.discussion_thread.last_post
assert_in('Ticket moved from /p/test/bugs/', post.text)
for t in original_tickets:
assert_equal(t.discussion_thread.app_config_id, original_ac_id)
- assert_equal(t.discussion_thread.discussion.app_config_id,
- original_ac_id)
+ assert_equal(t.discussion_thread.discussion.app_config_id, original_ac_id)
assert t.discussion_thread.last_post is None
@td.with_tool('test2', 'Tickets', 'bugs2')
@@ -2840,8 +2741,7 @@ class TestBulkMove(TrackerTestController):
'__search': '',
})
M.MonQTask.run_ready()
- emails = M.MonQTask.query.find(
- dict(task_name='allura.tasks.mail_tasks.sendmail')).all()
+ emails = M.MonQTask.query.find(dict(task_name='allura.tasks.mail_tasks.sendmail')).all()
assert_equal(len(emails), 3)
for email in emails:
assert_equal(email.kwargs.subject,
@@ -2904,8 +2804,7 @@ class TestBulkMove(TrackerTestController):
'__search': '',
})
M.MonQTask.run_ready()
- emails = M.MonQTask.query.find(
- dict(task_name='allura.tasks.mail_tasks.sendmail')).all()
+ emails = M.MonQTask.query.find(dict(task_name='allura.tasks.mail_tasks.sendmail')).all()
assert_equal(len(emails), 2)
for email in emails:
assert_equal(email.kwargs.subject,
@@ -2945,8 +2844,7 @@ class TestBulkMove(TrackerTestController):
'TicketMonitoringType': 'AllPublicTicketChanges',
})
self.new_ticket(summary='test first ticket', status='open')
- self.new_ticket(summary='test second ticket',
- status='open', private=True)
+ self.new_ticket(summary='test second ticket', status='open', private=True)
ThreadLocalORMSession.flush_all()
M.MonQTask.run_ready()
ThreadLocalORMSession.flush_all()
@@ -2962,8 +2860,7 @@ class TestBulkMove(TrackerTestController):
'__search': '',
})
M.MonQTask.run_ready()
- emails = M.MonQTask.query.find(
- dict(task_name='allura.tasks.mail_tasks.sendmail')).all()
+ emails = M.MonQTask.query.find(dict(task_name='allura.tasks.mail_tasks.sendmail')).all()
# one for admin and one for monitoring email
assert_equal(len(emails), 2)
for email in emails:
@@ -2994,10 +2891,8 @@ class TestBulkMove(TrackerTestController):
'TicketMonitoringEmail': 'monitoring@email.com',
'TicketMonitoringType': 'AllPublicTicketChanges',
})
- self.new_ticket(summary='test first ticket',
- status='open', private=True)
- self.new_ticket(summary='test second ticket',
- status='open', private=True)
+ self.new_ticket(summary='test first ticket', status='open', private=True)
+ self.new_ticket(summary='test second ticket', status='open', private=True)
ThreadLocalORMSession.flush_all()
M.MonQTask.run_ready()
ThreadLocalORMSession.flush_all()
@@ -3013,8 +2908,7 @@ class TestBulkMove(TrackerTestController):
'__search': '',
})
M.MonQTask.run_ready()
- emails = M.MonQTask.query.find(
- dict(task_name='allura.tasks.mail_tasks.sendmail')).all()
+ emails = M.MonQTask.query.find(dict(task_name='allura.tasks.mail_tasks.sendmail')).all()
assert_equal(len(emails), 1) # only admin email sent
for email in emails:
assert_equal(email.kwargs.subject,
@@ -3038,21 +2932,18 @@ def sidebar_contains(response, text):
class TestStats(TrackerTestController):
-
def test_stats(self):
r = self.app.get('/bugs/stats/', status=200)
assert_in('# tickets: 0', r.body)
class TestNotificationEmailGrouping(TrackerTestController):
-
def test_new_ticket_message_id(self):
self.new_ticket(summary='Test Ticket')
ThreadLocalORMSession.flush_all()
M.MonQTask.run_ready()
ThreadLocalORMSession.flush_all()
- email = M.MonQTask.query.find(
- dict(task_name='allura.tasks.mail_tasks.sendmail')).first()
+ email = M.MonQTask.query.find(dict(task_name='allura.tasks.mail_tasks.sendmail')).first()
ticket = tm.Ticket.query.get(ticket_num=1)
assert_equal(email.kwargs.message_id, ticket.message_id())
assert_equal(email.kwargs.in_reply_to, None)
@@ -3076,8 +2967,7 @@ class TestNotificationEmailGrouping(TrackerTestController):
M.MonQTask.run_ready()
ThreadLocalORMSession.flush_all()
# Check that comment notification refers ticket's message id
- email = M.MonQTask.query.find(
- dict(task_name='allura.tasks.mail_tasks.sendmail')).first()
+ email = M.MonQTask.query.find(dict(task_name='allura.tasks.mail_tasks.sendmail')).first()
ticket = tm.Ticket.query.get(ticket_num=1)
top_level_comment = ticket.discussion_thread.posts[0]
top_level_comment_msg_id = ticket.url() + top_level_comment._id
@@ -3098,11 +2988,9 @@ class TestNotificationEmailGrouping(TrackerTestController):
M.MonQTask.run_ready()
ThreadLocalORMSession.flush_all()
# Check that reply notification refers top-level comment's message id
- email = M.MonQTask.query.find(
- dict(task_name='allura.tasks.mail_tasks.sendmail')).first()
+ email = M.MonQTask.query.find(dict(task_name='allura.tasks.mail_tasks.sendmail')).first()
ticket = tm.Ticket.query.get(ticket_num=1)
- reply = [
- post for post in ticket.discussion_thread.posts if post.text == reply_text][0]
+ reply = [post for post in ticket.discussion_thread.posts if post.text == reply_text][0]
assert_equal(email.kwargs.message_id, ticket.url() + reply._id)
assert_equal(email.kwargs.in_reply_to, top_level_comment_msg_id)
assert_equal(email.kwargs.references,
@@ -3123,9 +3011,7 @@ def test_status_passthru():
assert_not_in('closed_status_names', app.config.options)
-
class TestArtifactLinks(TrackerTestController):
-
@td.with_tool('test', 'Tickets', 'features')
def test_ambiguous_shortlinks(self):
# Problem:
[4/4] allura git commit: PEP8 cleanup;
add license header to test_webhooks.py
Posted by br...@apache.org.
PEP8 cleanup; add license header to test_webhooks.py
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/a3620b4a
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/a3620b4a
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/a3620b4a
Branch: refs/heads/master
Commit: a3620b4af3bca102edaa17fbbeba84f1b92afcc2
Parents: 7a584f9
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Feb 18 19:43:48 2015 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Feb 18 21:42:26 2015 +0000
----------------------------------------------------------------------
.../allura/command/create_trove_categories.py | 541 ++++++++++---------
Allura/allura/lib/plugin.py | 61 ++-
Allura/allura/model/webhook.py | 1 -
Allura/allura/tests/functional/test_auth.py | 41 +-
Allura/allura/tests/test_webhooks.py | 42 +-
Allura/allura/webhooks.py | 9 +-
.../tests/functional/test_forum.py | 168 +++---
.../forgetracker/tests/functional/test_root.py | 528 +++++++-----------
8 files changed, 645 insertions(+), 746 deletions(-)
----------------------------------------------------------------------
[3/4] allura git commit: PEP8 cleanup;
add license header to test_webhooks.py
Posted by br...@apache.org.
http://git-wip-us.apache.org/repos/asf/allura/blob/a3620b4a/Allura/allura/command/create_trove_categories.py
----------------------------------------------------------------------
diff --git a/Allura/allura/command/create_trove_categories.py b/Allura/allura/command/create_trove_categories.py
index 2f2fb9f..eba9244 100644
--- a/Allura/allura/command/create_trove_categories.py
+++ b/Allura/allura/command/create_trove_categories.py
@@ -112,9 +112,9 @@ class CreateTroveCategoriesCommand(base.Command):
(618, 535, "nonprofit", "Non-Profit Organizations",
"Intended Audience :: by Industry or Sector :: Non-Profit Organizations", False))
self.create_trove_cat((599, 535, "aerospace", "Aerospace",
- "Intended Audience :: by Industry or Sector :: Aerospace", False))
+ "Intended Audience :: by Industry or Sector :: Aerospace", False))
self.create_trove_cat((569, 535, "government", "Government",
- "Intended Audience :: by Industry or Sector :: Government", False))
+ "Intended Audience :: by Industry or Sector :: Government", False))
self.create_trove_cat(
(363, 535, "informationtechnology", "Information Technology",
"Intended Audience :: by Industry or Sector :: Information Technology", False))
@@ -125,13 +125,13 @@ class CreateTroveCategoriesCommand(base.Command):
(362, 535, "healthcareindustry", "Healthcare Industry",
"Intended Audience :: by Industry or Sector :: Healthcare Industry", False))
self.create_trove_cat((367, 535, "scienceresearch", "Science/Research",
- "Intended Audience :: by Industry or Sector :: Science/Research", False))
+ "Intended Audience :: by Industry or Sector :: Science/Research", False))
self.create_trove_cat((359, 535, "customerservice", "Customer Service",
- "Intended Audience :: by Industry or Sector :: Customer Service", False))
+ "Intended Audience :: by Industry or Sector :: Customer Service", False))
self.create_trove_cat((360, 535, "education", "Education",
- "Intended Audience :: by Industry or Sector :: Education", False))
+ "Intended Audience :: by Industry or Sector :: Education", False))
self.create_trove_cat((365, 535, "manufacturing", "Manufacturing",
- "Intended Audience :: by Industry or Sector :: Manufacturing", False))
+ "Intended Audience :: by Industry or Sector :: Manufacturing", False))
self.create_trove_cat(
(368, 535, "telecommunications", "Telecommunications Industry",
"Intended Audience :: by Industry or Sector :: Telecommunications Industry", False))
@@ -155,7 +155,7 @@ class CreateTroveCategoriesCommand(base.Command):
(536, 534, "enduser_advanced", "Advanced End Users",
"Intended Audience :: by End-User Class :: Advanced End Users", False))
self.create_trove_cat((4, 534, "sysadmins", "System Administrators",
- "Intended Audience :: by End-User Class :: System Administrators", False))
+ "Intended Audience :: by End-User Class :: System Administrators", False))
self.create_trove_cat(
(471, 456, "ui_swing", "Java Swing", "User Interface :: Graphical :: Java Swing", True))
self.create_trove_cat(
@@ -163,7 +163,7 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(231, 456, "gnome", "Gnome", "User Interface :: Graphical :: Gnome", True))
self.create_trove_cat((229, 456, "x11", "X Window System (X11)",
- "User Interface :: Graphical :: X Window System (X11)", True))
+ "User Interface :: Graphical :: X Window System (X11)", True))
self.create_trove_cat(
(475, 456, "ui_opengl", "OpenGL", "User Interface :: Graphical :: OpenGL", True))
self.create_trove_cat(
@@ -173,15 +173,15 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(470, 456, "ui_awt", "Java AWT", "User Interface :: Graphical :: Java AWT", True))
self.create_trove_cat((230, 456, "win32", "Win32 (MS Windows)",
- "User Interface :: Graphical :: Win32 (MS Windows)", True))
+ "User Interface :: Graphical :: Win32 (MS Windows)", True))
self.create_trove_cat(
(232, 456, "kde", "KDE", "User Interface :: Graphical :: KDE", True))
self.create_trove_cat((310, 456, "cocoa", "Cocoa (MacOS X)",
- "User Interface :: Graphical :: Cocoa (MacOS X)", True))
+ "User Interface :: Graphical :: Cocoa (MacOS X)", True))
self.create_trove_cat(
(476, 456, "ui_tabletpc", "TabletPC", "User Interface :: Graphical :: TabletPC", True))
self.create_trove_cat((314, 456, "handhelds", "Handheld/Mobile/PDA",
- "User Interface :: Graphical :: Handheld/Mobile/PDA", True))
+ "User Interface :: Graphical :: Handheld/Mobile/PDA", True))
self.create_trove_cat(
(462, 225, "ui_groupingdesc", "Grouping and Descriptive Categories (UI)",
"User Interface :: Grouping and Descriptive Categories (UI)", True))
@@ -193,7 +193,8 @@ class CreateTroveCategoriesCommand(base.Command):
"User Interface :: Grouping and Descriptive Categories (UI) :: Project is a templating system", True))
self.create_trove_cat(
(463, 462, "ui_meta_system", "Project is a user interface (UI) system",
- "User Interface :: Grouping and Descriptive Categories (UI) :: Project is a user interface (UI) system", True))
+ "User Interface :: Grouping and Descriptive Categories (UI) :: Project is a user interface (UI) system",
+ True))
self.create_trove_cat(
(465, 462, "ui_meta_windowmanager", "Project is a window manager",
"User Interface :: Grouping and Descriptive Categories (UI) :: Project is a window manager", True))
@@ -202,15 +203,16 @@ class CreateTroveCategoriesCommand(base.Command):
"User Interface :: Grouping and Descriptive Categories (UI) :: Project is a graphics toolkit", True))
self.create_trove_cat(
(468, 462, "ui_meta_remotecontrol", "Project is a remote control application",
- "User Interface :: Grouping and Descriptive Categories (UI) :: Project is a remote control application", True))
+ "User Interface :: Grouping and Descriptive Categories (UI) :: Project is a remote control application",
+ True))
self.create_trove_cat(
(237, 225, "web", "Web-based", "User Interface :: Web-based", True))
self.create_trove_cat((238, 225, "daemon", "Non-interactive (Daemon)",
- "User Interface :: Non-interactive (Daemon)", True))
+ "User Interface :: Non-interactive (Daemon)", True))
self.create_trove_cat(
(457, 225, "textual_ui", "Textual", "User Interface :: Textual", True))
self.create_trove_cat((460, 457, "ui_consoleterm", "Console/Terminal",
- "User Interface :: Textual :: Console/Terminal", True))
+ "User Interface :: Textual :: Console/Terminal", True))
self.create_trove_cat(
(459, 457, "ui_commandline", "Command-line", "User Interface :: Textual :: Command-line", True))
self.create_trove_cat(
@@ -222,68 +224,75 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(458, 225, "ui_toolkit", "Toolkits/Libraries", "User Interface :: Toolkits/Libraries", True))
self.create_trove_cat((495, 458, "ui_othertoolkit", "Other toolkit",
- "User Interface :: Toolkits/Libraries :: Other toolkit", True))
+ "User Interface :: Toolkits/Libraries :: Other toolkit", True))
self.create_trove_cat((493, 458, "ui_motif", "Motif/LessTif",
- "User Interface :: Toolkits/Libraries :: Motif/LessTif", True))
+ "User Interface :: Toolkits/Libraries :: Motif/LessTif", True))
self.create_trove_cat((491, 458, "ui_crystalspace", "Crystal Space",
- "User Interface :: Toolkits/Libraries :: Crystal Space", True))
+ "User Interface :: Toolkits/Libraries :: Crystal Space", True))
self.create_trove_cat((489, 458, "ui_clanlib", "ClanLib",
- "User Interface :: Toolkits/Libraries :: ClanLib", True))
+ "User Interface :: Toolkits/Libraries :: ClanLib", True))
self.create_trove_cat(
(516, 500, "db_group_objmap", "Project is a relational object mapper",
- "Database Environment :: Grouping and Descriptive Categories (DB) :: Project is a relational object mapper", True))
+ "Database Environment :: Grouping and Descriptive Categories (DB) :: Project is a relational object mapper",
+ True))
self.create_trove_cat(
(487, 458, "ui_ggi", "GGI", "User Interface :: Toolkits/Libraries :: GGI", True))
self.create_trove_cat((485, 458, "ui_directx", "DirectX",
- "User Interface :: Toolkits/Libraries :: DirectX", True))
+ "User Interface :: Toolkits/Libraries :: DirectX", True))
self.create_trove_cat((483, 458, "ui_svgalib", "SVGAlib",
- "User Interface :: Toolkits/Libraries :: SVGAlib", True))
+ "User Interface :: Toolkits/Libraries :: SVGAlib", True))
self.create_trove_cat((481, 458, "ui_wxwidgets", "wxWidgets",
- "User Interface :: Toolkits/Libraries :: wxWidgets", True))
+ "User Interface :: Toolkits/Libraries :: wxWidgets", True))
self.create_trove_cat(
(511, 500, "db_group_mgmt", "Project is a database management tool",
- "Database Environment :: Grouping and Descriptive Categories (DB) :: Project is a database management tool", True))
+ "Database Environment :: Grouping and Descriptive Categories (DB) :: Project is a database management tool",
+ True))
self.create_trove_cat(
(479, 458, "ui_qt", "Qt", "User Interface :: Toolkits/Libraries :: Qt", True))
self.create_trove_cat(
(477, 458, "ui_gtk", "GTK+", "User Interface :: Toolkits/Libraries :: GTK+", True))
self.create_trove_cat(
(513, 500, "db_group_netdbms", "Project is a network-based DBMS (database system)",
- "Database Environment :: Grouping and Descriptive Categories (DB) :: Project is a network-based DBMS (database system)", True))
+ "Database Environment :: Grouping and Descriptive Categories (DB) :: Project is a network-based DBMS (database system)",
+ True))
self.create_trove_cat(
(228, 458, "newt", "Newt", "User Interface :: Toolkits/Libraries :: Newt", True))
self.create_trove_cat((227, 458, "curses", "Curses/Ncurses",
- "User Interface :: Toolkits/Libraries :: Curses/Ncurses", True))
+ "User Interface :: Toolkits/Libraries :: Curses/Ncurses", True))
self.create_trove_cat(
(515, 500, "db_group_conv", "Project is a database conversion tool",
- "Database Environment :: Grouping and Descriptive Categories (DB) :: Project is a database conversion tool", True))
+ "Database Environment :: Grouping and Descriptive Categories (DB) :: Project is a database conversion tool",
+ True))
self.create_trove_cat(
(478, 458, "ui_tk", "Tk", "User Interface :: Toolkits/Libraries :: Tk", True))
self.create_trove_cat(
(480, 458, "ui_sdl", "SDL", "User Interface :: Toolkits/Libraries :: SDL", True))
self.create_trove_cat((33, 28, "postoffice", "Post-Office",
- "Topic :: Communications :: Email :: Post-Office", True))
+ "Topic :: Communications :: Email :: Post-Office", True))
self.create_trove_cat(
(514, 500, "db_group_propfmt", "Project is a tool for a proprietary database file format",
- "Database Environment :: Grouping and Descriptive Categories (DB) :: Project is a tool for a proprietary database file format", True))
+ "Database Environment :: Grouping and Descriptive Categories (DB) :: Project is a tool for a proprietary database file format",
+ True))
self.create_trove_cat(
(482, 458, "ui_aalib", "AAlib", "User Interface :: Toolkits/Libraries :: AAlib", True))
self.create_trove_cat(
(484, 458, "ui_fltk", "FLTK", "User Interface :: Toolkits/Libraries :: FLTK", True))
self.create_trove_cat(
(512, 500, "db_group_filedbms", "Project is a file-based DBMS (database system)",
- "Database Environment :: Grouping and Descriptive Categories (DB) :: Project is a file-based DBMS (database system)", True))
+ "Database Environment :: Grouping and Descriptive Categories (DB) :: Project is a file-based DBMS (database system)",
+ True))
self.create_trove_cat(
(486, 458, "ui_plib", "Plib", "User Interface :: Toolkits/Libraries :: Plib", True))
self.create_trove_cat(
(488, 458, "ui_glide", "Glide", "User Interface :: Toolkits/Libraries :: Glide", True))
self.create_trove_cat(
(510, 500, "db_group_api", "Project is a database abstraction layer (API)",
- "Database Environment :: Grouping and Descriptive Categories (DB) :: Project is a database abstraction layer (API)", True))
+ "Database Environment :: Grouping and Descriptive Categories (DB) :: Project is a database abstraction layer (API)",
+ True))
self.create_trove_cat(
(490, 458, "ui_glut", "GLUT", "User Interface :: Toolkits/Libraries :: GLUT", True))
self.create_trove_cat((492, 458, "ui_allegro", "Allegro",
- "User Interface :: Toolkits/Libraries :: Allegro", True))
+ "User Interface :: Toolkits/Libraries :: Allegro", True))
self.create_trove_cat(
(500, 496, "db_grouping", "Grouping and Descriptive Categories (DB)",
"Database Environment :: Grouping and Descriptive Categories (DB)", True))
@@ -294,12 +303,12 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(276, 274, "french", "French", "Translations :: French", True))
self.create_trove_cat((473, 456, "ui_carbon", "Carbon (Mac OS X)",
- "User Interface :: Graphical :: Carbon (Mac OS X)", True))
+ "User Interface :: Graphical :: Carbon (Mac OS X)", True))
self.create_trove_cat(
(535, 1, "by_industrysector", "by Industry or Sector",
"Intended Audience :: by Industry or Sector", False))
self.create_trove_cat((364, 535, "legalindustry", "Legal Industry",
- "Intended Audience :: by Industry or Sector :: Legal Industry", False))
+ "Intended Audience :: by Industry or Sector :: Legal Industry", False))
self.create_trove_cat(
(353, 274, "ukrainian", "Ukrainian", "Translations :: Ukrainian", True))
self.create_trove_cat(
@@ -339,11 +348,11 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(186, 160, "visualbasic", "Visual Basic", "Programming Language :: Visual Basic", True))
self.create_trove_cat((505, 499, "db_pear", "PHP Pear::DB",
- "Database Environment :: Database API :: PHP Pear::DB", True))
+ "Database Environment :: Database API :: PHP Pear::DB", True))
self.create_trove_cat((507, 499, "db_api_xml", "XML-based",
- "Database Environment :: Database API :: XML-based", True))
+ "Database Environment :: Database API :: XML-based", True))
self.create_trove_cat((509, 499, "db_api_other", "Other API",
- "Database Environment :: Database API :: Other API", True))
+ "Database Environment :: Database API :: Other API", True))
self.create_trove_cat(
(532, 497, "db_net_hsql", "HSQL", "Database Environment :: Network-based DBMS :: HSQL", True))
self.create_trove_cat(
@@ -375,23 +384,23 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(502, 499, "db_api_jdbc", "JDBC", "Database Environment :: Database API :: JDBC", True))
self.create_trove_cat((504, 499, "db_api_perldbi", "Perl DBI/DBD",
- "Database Environment :: Database API :: Perl DBI/DBD", True))
+ "Database Environment :: Database API :: Perl DBI/DBD", True))
self.create_trove_cat(
(274, 0, "natlanguage", "Translations", "Translations", True))
self.create_trove_cat((506, 499, "db_python", "Python Database API",
- "Database Environment :: Database API :: Python Database API", True))
+ "Database Environment :: Database API :: Python Database API", True))
self.create_trove_cat((526, 497, "db_net_oracle", "Oracle",
- "Database Environment :: Network-based DBMS :: Oracle", True))
+ "Database Environment :: Network-based DBMS :: Oracle", True))
self.create_trove_cat((524, 497, "db_net_mysql", "MySQL",
- "Database Environment :: Network-based DBMS :: MySQL", True))
+ "Database Environment :: Network-based DBMS :: MySQL", True))
self.create_trove_cat((525, 497, "db_net_pgsql", "PostgreSQL (pgsql)",
- "Database Environment :: Network-based DBMS :: PostgreSQL (pgsql)", True))
+ "Database Environment :: Network-based DBMS :: PostgreSQL (pgsql)", True))
self.create_trove_cat((527, 497, "db_net_ibmdb2", "IBM DB2",
- "Database Environment :: Network-based DBMS :: IBM DB2", True))
+ "Database Environment :: Network-based DBMS :: IBM DB2", True))
self.create_trove_cat((529, 497, "db_net_sybase", "Sybase",
- "Database Environment :: Network-based DBMS :: Sybase", True))
+ "Database Environment :: Network-based DBMS :: Sybase", True))
self.create_trove_cat((531, 497, "db_net_sqlite", "SQLite",
- "Database Environment :: Network-based DBMS :: SQLite", True))
+ "Database Environment :: Network-based DBMS :: SQLite", True))
self.create_trove_cat(
(533, 497, "db_net_other", "Other network-based DBMS",
"Database Environment :: Network-based DBMS :: Other network-based DBMS", True))
@@ -402,7 +411,7 @@ class CreateTroveCategoriesCommand(base.Command):
(426, 199, "os_emu_api", "Emulation and API Compatibility",
"Operating System :: Emulation and API Compatibility", True))
self.create_trove_cat((311, 236, "macos9", "Apple Mac OS Classic",
- "Operating System :: Other Operating Systems :: Apple Mac OS Classic", True))
+ "Operating System :: Other Operating Systems :: Apple Mac OS Classic", True))
self.create_trove_cat(
(224, 236, "beos", "BeOS", "Operating System :: Other Operating Systems :: BeOS", True))
self.create_trove_cat(
@@ -410,7 +419,7 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(421, 236, "mswin_95", "Win95", "Operating System :: Other Operating Systems :: Win95", True))
self.create_trove_cat((508, 499, "db_api_sql", "SQL-based",
- "Database Environment :: Database API :: SQL-based", True))
+ "Database Environment :: Database API :: SQL-based", True))
self.create_trove_cat(
(499, 496, "db_api", "Database API", "Database Environment :: Database API", True))
self.create_trove_cat(
@@ -432,29 +441,29 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(29, 28, "filters", "Filters", "Topic :: Communications :: Email :: Filters", True))
self.create_trove_cat((30, 28, "listservers", "Mailing List Servers",
- "Topic :: Communications :: Email :: Mailing List Servers", True))
+ "Topic :: Communications :: Email :: Mailing List Servers", True))
self.create_trove_cat(
(597, 80, "card_games", "Card Games", "Topic :: Games/Entertainment :: Card Games", True))
self.create_trove_cat(
(63, 18, "editors", "Text Editors", "Topic :: Text Editors", True))
self.create_trove_cat((366, 535, "religion", "Religion",
- "Intended Audience :: by Industry or Sector :: Religion", False))
+ "Intended Audience :: by Industry or Sector :: Religion", False))
self.create_trove_cat(
(534, 1, "by_enduser", "by End-User Class", "Intended Audience :: by End-User Class", False))
self.create_trove_cat(
(528, 497, "db_net_firebird", "Firebird/InterBase",
"Database Environment :: Network-based DBMS :: Firebird/InterBase", True))
self.create_trove_cat((3, 534, "developers", "Developers",
- "Intended Audience :: by End-User Class :: Developers", False))
+ "Intended Audience :: by End-User Class :: Developers", False))
self.create_trove_cat(
(530, 497, "db_net_mssql", "Microsoft SQL Server",
"Database Environment :: Network-based DBMS :: Microsoft SQL Server", True))
self.create_trove_cat((2, 534, "endusers", "End Users/Desktop",
- "Intended Audience :: by End-User Class :: End Users/Desktop", False))
+ "Intended Audience :: by End-User Class :: End Users/Desktop", False))
self.create_trove_cat(
(498, 496, "db_filebased", "File-based DBMS", "Database Environment :: File-based DBMS", True))
self.create_trove_cat((537, 534, "enduser_qa", "Quality Engineers",
- "Intended Audience :: by End-User Class :: Quality Engineers", False))
+ "Intended Audience :: by End-User Class :: Quality Engineers", False))
self.create_trove_cat(
(5, 1, "other", "Other Audience", "Intended Audience :: Other Audience", False))
self.create_trove_cat(
@@ -463,7 +472,7 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(358, 6, "inactive", "7 - Inactive", "Development Status :: 7 - Inactive", False))
self.create_trove_cat((520, 498, "db_file_palm", "PalmOS PDB",
- "Database Environment :: File-based DBMS :: PalmOS PDB", True))
+ "Database Environment :: File-based DBMS :: PalmOS PDB", True))
self.create_trove_cat(
(523, 498, "db_file_other", "Other file-based DBMS",
"Database Environment :: File-based DBMS :: Other file-based DBMS", True))
@@ -502,7 +511,7 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(174, 160, "objectivec", "Objective C", "Programming Language :: Objective C", True))
self.create_trove_cat((560, 160, "xsl", "XSL (XSLT/XPath/XSL-FO)",
- "Programming Language :: XSL (XSLT/XPath/XSL-FO)", True))
+ "Programming Language :: XSL (XSLT/XPath/XSL-FO)", True))
self.create_trove_cat(
(293, 160, "ruby", "Ruby", "Programming Language :: Ruby", True))
self.create_trove_cat(
@@ -510,7 +519,7 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(281, 160, "REBOL", "REBOL", "Programming Language :: REBOL", True))
self.create_trove_cat((454, 160, "ocaml", "OCaml (Objective Caml)",
- "Programming Language :: OCaml (Objective Caml)", True))
+ "Programming Language :: OCaml (Objective Caml)", True))
self.create_trove_cat(
(453, 160, "vb_net", "Visual Basic .NET", "Programming Language :: Visual Basic .NET", True))
self.create_trove_cat(
@@ -588,13 +597,13 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(336, 274, "indonesian", "Indonesian", "Translations :: Indonesian", True))
self.create_trove_cat((521, 498, "db_file_flat", "Flat-file",
- "Database Environment :: File-based DBMS :: Flat-file", True))
+ "Database Environment :: File-based DBMS :: Flat-file", True))
self.create_trove_cat((519, 498, "db_file_xbase", "xBase",
- "Database Environment :: File-based DBMS :: xBase", True))
+ "Database Environment :: File-based DBMS :: xBase", True))
self.create_trove_cat(
(338, 274, "javanese", "Javanese", "Translations :: Javanese", True))
self.create_trove_cat((518, 498, "db_msaccess", "Microsoft Access",
- "Database Environment :: File-based DBMS :: Microsoft Access", True))
+ "Database Environment :: File-based DBMS :: Microsoft Access", True))
self.create_trove_cat(
(522, 498, "db_file_proprietary", "Proprietary file format",
"Database Environment :: File-based DBMS :: Proprietary file format", True))
@@ -627,7 +636,7 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(277, 274, "spanish", "Spanish", "Translations :: Spanish", True))
self.create_trove_cat((11, 6, "production", "5 - Production/Stable",
- "Development Status :: 5 - Production/Stable", False))
+ "Development Status :: 5 - Production/Stable", False))
self.create_trove_cat(
(10, 6, "beta", "4 - Beta", "Development Status :: 4 - Beta", False))
self.create_trove_cat(
@@ -646,9 +655,9 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(14, 13, "osi", "OSI-Approved Open Source", "License :: OSI-Approved Open Source", False))
self.create_trove_cat((388, 14, "osl", "Open Software License",
- "License :: OSI-Approved Open Source :: Open Software License", False))
+ "License :: OSI-Approved Open Source :: Open Software License", False))
self.create_trove_cat((321, 14, "motosoto", "Motosoto License",
- "License :: OSI-Approved Open Source :: Motosoto License", False))
+ "License :: OSI-Approved Open Source :: Motosoto License", False))
self.create_trove_cat(
(325, 14, "attribut", "Attribution Assurance License",
"License :: OSI-Approved Open Source :: Attribution Assurance License", False))
@@ -667,18 +676,18 @@ class CreateTroveCategoriesCommand(base.Command):
(395, 14, "real", "RealNetworks Public Source License V1.0",
"License :: OSI-Approved Open Source :: RealNetworks Public Source License V1.0", False))
self.create_trove_cat((396, 14, "rpl", "Reciprocal Public License",
- "License :: OSI-Approved Open Source :: Reciprocal Public License", False))
+ "License :: OSI-Approved Open Source :: Reciprocal Public License", False))
self.create_trove_cat((392, 14, "eiffel2", "Eiffel Forum License V2.0",
- "License :: OSI-Approved Open Source :: Eiffel Forum License V2.0", False))
+ "License :: OSI-Approved Open Source :: Eiffel Forum License V2.0", False))
self.create_trove_cat(
(320, 14, "w3c", "W3C License", "License :: OSI-Approved Open Source :: W3C License", False))
self.create_trove_cat((400, 14, "frameworx", "Frameworx Open License",
- "License :: OSI-Approved Open Source :: Frameworx Open License", False))
+ "License :: OSI-Approved Open Source :: Frameworx Open License", False))
self.create_trove_cat(
(194, 14, "python", "Python License (CNRI Python License)",
"License :: OSI-Approved Open Source :: Python License (CNRI Python License)", False))
self.create_trove_cat((296, 14, "apache", "Apache Software License",
- "License :: OSI-Approved Open Source :: Apache Software License", False))
+ "License :: OSI-Approved Open Source :: Apache Software License", False))
self.create_trove_cat(
(298, 14, "sissl", "Sun Industry Standards Source License (SISSL)",
"License :: OSI-Approved Open Source :: Sun Industry Standards Source License (SISSL)", False))
@@ -687,13 +696,13 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(197, 13, "publicdomain", "Public Domain", "License :: Public Domain", False))
self.create_trove_cat((301, 14, "nokia", "Nokia Open Source License",
- "License :: OSI-Approved Open Source :: Nokia Open Source License", False))
+ "License :: OSI-Approved Open Source :: Nokia Open Source License", False))
self.create_trove_cat((319, 14, "eiffel", "Eiffel Forum License",
- "License :: OSI-Approved Open Source :: Eiffel Forum License", False))
+ "License :: OSI-Approved Open Source :: Eiffel Forum License", False))
self.create_trove_cat((318, 14, "sunpublic", "Sun Public License",
- "License :: OSI-Approved Open Source :: Sun Public License", False))
+ "License :: OSI-Approved Open Source :: Sun Public License", False))
self.create_trove_cat((190, 14, "qpl", "Qt Public License (QPL)",
- "License :: OSI-Approved Open Source :: Qt Public License (QPL)", False))
+ "License :: OSI-Approved Open Source :: Qt Public License (QPL)", False))
self.create_trove_cat(
(390, 14, "oclc", "OCLC Research Public License 2.0",
"License :: OSI-Approved Open Source :: OCLC Research Public License 2.0", False))
@@ -707,12 +716,12 @@ class CreateTroveCategoriesCommand(base.Command):
(316, 14, "opengroup", "Open Group Test Suite License",
"License :: OSI-Approved Open Source :: Open Group Test Suite License", False))
self.create_trove_cat((300, 14, "jabber", "Jabber Open Source License",
- "License :: OSI-Approved Open Source :: Jabber Open Source License", False))
+ "License :: OSI-Approved Open Source :: Jabber Open Source License", False))
self.create_trove_cat(
(297, 14, "vovida", "Vovida Software License 1.0",
"License :: OSI-Approved Open Source :: Vovida Software License 1.0", False))
self.create_trove_cat((324, 14, "afl", "Academic Free License (AFL)",
- "License :: OSI-Approved Open Source :: Academic Free License (AFL)", False))
+ "License :: OSI-Approved Open Source :: Academic Free License (AFL)", False))
self.create_trove_cat(
(189, 14, "psfl", "Python Software Foundation License",
"License :: OSI-Approved Open Source :: Python Software Foundation License", False))
@@ -720,7 +729,7 @@ class CreateTroveCategoriesCommand(base.Command):
(193, 14, "rscpl", "Ricoh Source Code Public License",
"License :: OSI-Approved Open Source :: Ricoh Source Code Public License", False))
self.create_trove_cat((17, 14, "artistic", "Artistic License",
- "License :: OSI-Approved Open Source :: Artistic License", False))
+ "License :: OSI-Approved Open Source :: Artistic License", False))
self.create_trove_cat(
(389, 14, "sybase", "Sybase Open Watcom Public License",
"License :: OSI-Approved Open Source :: Sybase Open Watcom Public License", False))
@@ -728,7 +737,7 @@ class CreateTroveCategoriesCommand(base.Command):
(391, 14, "wxwindows", "wxWindows Library Licence",
"License :: OSI-Approved Open Source :: wxWindows Library Licence", False))
self.create_trove_cat((397, 14, "entessa", "Entessa Public License",
- "License :: OSI-Approved Open Source :: Entessa Public License", False))
+ "License :: OSI-Approved Open Source :: Entessa Public License", False))
self.create_trove_cat(
(16, 14, "lgpl", "GNU Library or Lesser General Public License (LGPL)",
"License :: OSI-Approved Open Source :: GNU Library or Lesser General Public License (LGPL)", False))
@@ -739,14 +748,14 @@ class CreateTroveCategoriesCommand(base.Command):
(15, 14, "gpl", "GNU General Public License (GPL)",
"License :: OSI-Approved Open Source :: GNU General Public License (GPL)", False))
self.create_trove_cat((191, 14, "ibm", "IBM Public License",
- "License :: OSI-Approved Open Source :: IBM Public License", False))
+ "License :: OSI-Approved Open Source :: IBM Public License", False))
self.create_trove_cat(
(192, 14, "cvw", "MITRE Collaborative Virtual Workspace License (CVW)",
"License :: OSI-Approved Open Source :: MITRE Collaborative Virtual Workspace License (CVW)", False))
self.create_trove_cat((299, 14, "iosl", "Intel Open Source License",
- "License :: OSI-Approved Open Source :: Intel Open Source License", False))
+ "License :: OSI-Approved Open Source :: Intel Open Source License", False))
self.create_trove_cat((399, 14, "php-license", "PHP License",
- "License :: OSI-Approved Open Source :: PHP License", False))
+ "License :: OSI-Approved Open Source :: PHP License", False))
self.create_trove_cat(
(188, 14, "mit", "MIT License", "License :: OSI-Approved Open Source :: MIT License", False))
self.create_trove_cat(
@@ -758,35 +767,35 @@ class CreateTroveCategoriesCommand(base.Command):
(403, 14, "datagrid", "EU DataGrid Software License",
"License :: OSI-Approved Open Source :: EU DataGrid Software License", False))
self.create_trove_cat((307, 14, "ibmcpl", "Common Public License",
- "License :: OSI-Approved Open Source :: Common Public License", False))
+ "License :: OSI-Approved Open Source :: Common Public License", False))
self.create_trove_cat(
(402, 14, "cua", "CUA Office Public License Version 1.0",
"License :: OSI-Approved Open Source :: CUA Office Public License Version 1.0", False))
self.create_trove_cat((401, 14, "apache2", "Apache License V2.0",
- "License :: OSI-Approved Open Source :: Apache License V2.0", False))
+ "License :: OSI-Approved Open Source :: Apache License V2.0", False))
self.create_trove_cat((394, 14, "nausite", "Naumen Public License",
- "License :: OSI-Approved Open Source :: Naumen Public License", False))
+ "License :: OSI-Approved Open Source :: Naumen Public License", False))
self.create_trove_cat((317, 14, "xnet", "X.Net License",
- "License :: OSI-Approved Open Source :: X.Net License", False))
+ "License :: OSI-Approved Open Source :: X.Net License", False))
self.create_trove_cat((195, 14, "zlib", "zlib/libpng License",
- "License :: OSI-Approved Open Source :: zlib/libpng License", False))
+ "License :: OSI-Approved Open Source :: zlib/libpng License", False))
self.create_trove_cat(
(323, 14, "ncsa", "University of Illinois/NCSA Open Source License",
"License :: OSI-Approved Open Source :: University of Illinois/NCSA Open Source License", False))
self.create_trove_cat((322, 14, "zope", "Zope Public License",
- "License :: OSI-Approved Open Source :: Zope Public License", False))
+ "License :: OSI-Approved Open Source :: Zope Public License", False))
self.create_trove_cat((302, 14, "sleepycat", "Sleepycat License",
- "License :: OSI-Approved Open Source :: Sleepycat License", False))
+ "License :: OSI-Approved Open Source :: Sleepycat License", False))
self.create_trove_cat(
(303, 14, "nethack", "Nethack General Public License",
"License :: OSI-Approved Open Source :: Nethack General Public License", False))
self.create_trove_cat((306, 14, "apsl", "Apple Public Source License",
- "License :: OSI-Approved Open Source :: Apple Public Source License", False))
+ "License :: OSI-Approved Open Source :: Apple Public Source License", False))
self.create_trove_cat(
(305, 14, "mpl11", "Mozilla Public License 1.1 (MPL 1.1)",
"License :: OSI-Approved Open Source :: Mozilla Public License 1.1 (MPL 1.1)", False))
self.create_trove_cat((628, 14, "adaptive", "Adaptive Public License",
- "License :: OSI-Approved Open Source :: Adaptive Public License", False))
+ "License :: OSI-Approved Open Source :: Adaptive Public License", False))
self.create_trove_cat(
(630, 14, "cddl", "Common Development and Distribution License",
"License :: OSI-Approved Open Source :: Common Development and Distribution License", False))
@@ -796,15 +805,15 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(199, 0, "os", "Operating System", "Operating System", True))
self.create_trove_cat((429, 426, "fink", "Fink (Mac OS X)",
- "Operating System :: Emulation and API Compatibility :: Fink (Mac OS X)", True))
+ "Operating System :: Emulation and API Compatibility :: Fink (Mac OS X)", True))
self.create_trove_cat((427, 426, "cygwin", "Cygwin (MS Windows)",
- "Operating System :: Emulation and API Compatibility :: Cygwin (MS Windows)", True))
+ "Operating System :: Emulation and API Compatibility :: Cygwin (MS Windows)", True))
self.create_trove_cat(
(428, 426, "dosemu", "DOSEMU", "Operating System :: Emulation and API Compatibility :: DOSEMU", True))
self.create_trove_cat(
(430, 426, "wine", "WINE", "Operating System :: Emulation and API Compatibility :: WINE", True))
self.create_trove_cat((431, 426, "emx", "EMX (OS/2 and MS-DOS)",
- "Operating System :: Emulation and API Compatibility :: EMX (OS/2 and MS-DOS)", True))
+ "Operating System :: Emulation and API Compatibility :: EMX (OS/2 and MS-DOS)", True))
self.create_trove_cat(
(445, 426, "mingw_msys", "MinGW/MSYS (MS Windows)",
"Operating System :: Emulation and API Compatibility :: MinGW/MSYS (MS Windows)", True))
@@ -818,49 +827,62 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(441, 315, "ecos", "eCos", "Operating System :: Handheld/Embedded Operating Systems :: eCos", True))
self.create_trove_cat(
- (443, 315, "vxworks", "VxWorks", "Operating System :: Handheld/Embedded Operating Systems :: VxWorks", True))
+ (
+ 443, 315, "vxworks", "VxWorks", "Operating System :: Handheld/Embedded Operating Systems :: VxWorks", True))
self.create_trove_cat((444, 315, "symbianos", "SymbianOS",
- "Operating System :: Handheld/Embedded Operating Systems :: SymbianOS", True))
+ "Operating System :: Handheld/Embedded Operating Systems :: SymbianOS", True))
self.create_trove_cat(
(442, 315, "qnx", "QNX", "Operating System :: Handheld/Embedded Operating Systems :: QNX", True))
self.create_trove_cat(
- (440, 315, "uclinux", "uClinux", "Operating System :: Handheld/Embedded Operating Systems :: uClinux", True))
+ (
+ 440, 315, "uclinux", "uClinux", "Operating System :: Handheld/Embedded Operating Systems :: uClinux", True))
self.create_trove_cat(
(418, 199, "modern_oses", "Modern (Vendor-Supported) Desktop Operating Systems",
"Operating System :: Modern (Vendor-Supported) Desktop Operating Systems", True))
self.create_trove_cat((420, 418, "mswin_2000", "Win2K",
- "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: Win2K", True))
+ "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: Win2K",
+ True))
self.create_trove_cat(
- (207, 418, "sun", "Solaris", "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: Solaris", True))
+ (207, 418, "sun", "Solaris",
+ "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: Solaris", True))
self.create_trove_cat(
- (201, 418, "linux", "Linux", "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: Linux", True))
+ (201, 418, "linux", "Linux",
+ "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: Linux", True))
self.create_trove_cat((205, 418, "openbsd", "OpenBSD",
- "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: OpenBSD", True))
+ "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: OpenBSD",
+ True))
self.create_trove_cat((203, 418, "freebsd", "FreeBSD",
- "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: FreeBSD", True))
+ "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: FreeBSD",
+ True))
self.create_trove_cat(
- (204, 418, "netbsd", "NetBSD", "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: NetBSD", True))
+ (204, 418, "netbsd", "NetBSD",
+ "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: NetBSD", True))
self.create_trove_cat(
- (309, 418, "macosx", "OS X", "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: OS X", True))
+ (309, 418, "macosx", "OS X",
+ "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: OS X", True))
self.create_trove_cat(
- (419, 418, "mswin_xp", "WinXP", "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: WinXP", True))
+ (419, 418, "mswin_xp", "WinXP",
+ "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: WinXP", True))
self.create_trove_cat((236, 199, "other", "Other Operating Systems",
- "Operating System :: Other Operating Systems", True))
+ "Operating System :: Other Operating Systems", True))
self.create_trove_cat(
(206, 236, "bsdos", "BSD/OS", "Operating System :: Other Operating Systems :: BSD/OS", True))
self.create_trove_cat(
(634, 236, "console-platforms", "Console-based Platforms",
"Operating System :: Other Operating Systems :: Console-based Platforms", True))
self.create_trove_cat((637, 634, "sega-dreamcast", "Sega Dreamcast",
- "Operating System :: Other Operating Systems :: Console-based Platforms :: Sega Dreamcast", True))
+ "Operating System :: Other Operating Systems :: Console-based Platforms :: Sega Dreamcast",
+ True))
self.create_trove_cat((635, 634, "xbox", "Microsoft Xbox",
- "Operating System :: Other Operating Systems :: Console-based Platforms :: Microsoft Xbox", True))
+ "Operating System :: Other Operating Systems :: Console-based Platforms :: Microsoft Xbox",
+ True))
self.create_trove_cat((636, 634, "sony-ps2", "Sony Playstation 2",
- "Operating System :: Other Operating Systems :: Console-based Platforms :: Sony Playstation 2", True))
+ "Operating System :: Other Operating Systems :: Console-based Platforms :: Sony Playstation 2",
+ True))
self.create_trove_cat(
(422, 236, "mswin_98", "Win98", "Operating System :: Other Operating Systems :: Win98", True))
self.create_trove_cat((425, 422, "mswin_98_osr2", "Win98 OSR2",
- "Operating System :: Other Operating Systems :: Win98 :: Win98 OSR2", True))
+ "Operating System :: Other Operating Systems :: Win98 :: Win98 OSR2", True))
self.create_trove_cat(
(424, 236, "mswin_me", "WinME", "Operating System :: Other Operating Systems :: WinME", True))
self.create_trove_cat(
@@ -889,27 +911,32 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(240, 236, "gnuhurd", "GNU Hurd", "Operating System :: Other Operating Systems :: GNU Hurd", True))
self.create_trove_cat((217, 236, "win31", "Microsoft Windows 3.x",
- "Operating System :: Other Operating Systems :: Microsoft Windows 3.x", True))
+ "Operating System :: Other Operating Systems :: Microsoft Windows 3.x", True))
self.create_trove_cat(
(432, 199, "os_groups", "Grouping and Descriptive Categories",
"Operating System :: Grouping and Descriptive Categories", True))
self.create_trove_cat((218, 432, "win95", "32-bit MS Windows (95/98)",
- "Operating System :: Grouping and Descriptive Categories :: 32-bit MS Windows (95/98)", True))
+ "Operating System :: Grouping and Descriptive Categories :: 32-bit MS Windows (95/98)",
+ True))
self.create_trove_cat(
(439, 432, "os_projectdistrospecific", "Project is OS Distribution-Specific",
"Operating System :: Grouping and Descriptive Categories :: Project is OS Distribution-Specific", True))
self.create_trove_cat(
(449, 432, "eightbit_oses", "Classic 8-bit Operating Systems (Apple, Atari, Commodore, etc.)",
- "Operating System :: Grouping and Descriptive Categories :: Classic 8-bit Operating Systems (Apple, Atari, Commodore, etc.)", True))
+ "Operating System :: Grouping and Descriptive Categories :: Classic 8-bit Operating Systems (Apple, Atari, Commodore, etc.)",
+ True))
self.create_trove_cat(
(436, 432, "os_portable", "OS Portable (Source code to work with many OS platforms)",
- "Operating System :: Grouping and Descriptive Categories :: OS Portable (Source code to work with many OS platforms)", True))
+ "Operating System :: Grouping and Descriptive Categories :: OS Portable (Source code to work with many OS platforms)",
+ True))
self.create_trove_cat(
(438, 432, "os_projectdistro", "Project is an Operating System Distribution",
- "Operating System :: Grouping and Descriptive Categories :: Project is an Operating System Distribution", True))
+ "Operating System :: Grouping and Descriptive Categories :: Project is an Operating System Distribution",
+ True))
self.create_trove_cat(
(235, 432, "independent", "OS Independent (Written in an interpreted language)",
- "Operating System :: Grouping and Descriptive Categories :: OS Independent (Written in an interpreted language)", True))
+ "Operating System :: Grouping and Descriptive Categories :: OS Independent (Written in an interpreted language)",
+ True))
self.create_trove_cat(
(200, 432, "posix", "All POSIX (Linux/BSD/UNIX-like OSes)",
"Operating System :: Grouping and Descriptive Categories :: All POSIX (Linux/BSD/UNIX-like OSes)", True))
@@ -918,10 +945,12 @@ class CreateTroveCategoriesCommand(base.Command):
"Operating System :: Grouping and Descriptive Categories :: 32-bit MS Windows (NT/2000/XP)", True))
self.create_trove_cat(
(202, 432, "bsd", "All BSD Platforms (FreeBSD/NetBSD/OpenBSD/Apple Mac OS X)",
- "Operating System :: Grouping and Descriptive Categories :: All BSD Platforms (FreeBSD/NetBSD/OpenBSD/Apple Mac OS X)", True))
+ "Operating System :: Grouping and Descriptive Categories :: All BSD Platforms (FreeBSD/NetBSD/OpenBSD/Apple Mac OS X)",
+ True))
self.create_trove_cat(
(435, 432, "mswin_all32bit", "All 32-bit MS Windows (95/98/NT/2000/XP)",
- "Operating System :: Grouping and Descriptive Categories :: All 32-bit MS Windows (95/98/NT/2000/XP)", True))
+ "Operating System :: Grouping and Descriptive Categories :: All 32-bit MS Windows (95/98/NT/2000/XP)",
+ True))
self.create_trove_cat(
(437, 432, "os_projectkernel", "Project is an Operating System Kernel",
"Operating System :: Grouping and Descriptive Categories :: Project is an Operating System Kernel", True))
@@ -937,9 +966,9 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(285, 63, "textprocessing", "Text Processing", "Topic :: Text Editors :: Text Processing", True))
self.create_trove_cat((611, 18, "formats_and_protocols",
- "Formats and Protocols", "Topic :: Formats and Protocols", True))
+ "Formats and Protocols", "Topic :: Formats and Protocols", True))
self.create_trove_cat((554, 611, "data_formats", "Data Formats",
- "Topic :: Formats and Protocols :: Data Formats", True))
+ "Topic :: Formats and Protocols :: Data Formats", True))
self.create_trove_cat(
(559, 554, "xml", "XML", "Topic :: Formats and Protocols :: Data Formats :: XML", True))
self.create_trove_cat(
@@ -947,9 +976,9 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(555, 554, "docbook", "DocBook", "Topic :: Formats and Protocols :: Data Formats :: DocBook", True))
self.create_trove_cat((556, 554, "html_xhtml", "HTML/XHTML",
- "Topic :: Formats and Protocols :: Data Formats :: HTML/XHTML", True))
+ "Topic :: Formats and Protocols :: Data Formats :: HTML/XHTML", True))
self.create_trove_cat((558, 554, "tex_latex", "TeX/LaTeX",
- "Topic :: Formats and Protocols :: Data Formats :: TeX/LaTeX", True))
+ "Topic :: Formats and Protocols :: Data Formats :: TeX/LaTeX", True))
self.create_trove_cat(
(612, 611, "protocols", "Protocols", "Topic :: Formats and Protocols :: Protocols", True))
self.create_trove_cat(
@@ -984,11 +1013,11 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(22, 20, "chat", "Chat", "Topic :: Communications :: Chat", True))
self.create_trove_cat((574, 22, "msn_messenger", "MSN Messenger",
- "Topic :: Communications :: Chat :: MSN Messenger", True))
+ "Topic :: Communications :: Chat :: MSN Messenger", True))
self.create_trove_cat((26, 22, "aim", "AOL Instant Messenger",
- "Topic :: Communications :: Chat :: AOL Instant Messenger", True))
+ "Topic :: Communications :: Chat :: AOL Instant Messenger", True))
self.create_trove_cat((24, 22, "irc", "Internet Relay Chat",
- "Topic :: Communications :: Chat :: Internet Relay Chat", True))
+ "Topic :: Communications :: Chat :: Internet Relay Chat", True))
self.create_trove_cat(
(25, 22, "talk", "Unix Talk", "Topic :: Communications :: Chat :: Unix Talk", True))
self.create_trove_cat(
@@ -1002,7 +1031,7 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(251, 20, "filesharing", "File Sharing", "Topic :: Communications :: File Sharing", True))
self.create_trove_cat((622, 251, "bittorrent", "BitTorrent",
- "Topic :: Communications :: File Sharing :: BitTorrent", True))
+ "Topic :: Communications :: File Sharing :: BitTorrent", True))
self.create_trove_cat(
(286, 251, "gnutella", "Gnutella", "Topic :: Communications :: File Sharing :: Gnutella", True))
self.create_trove_cat(
@@ -1012,9 +1041,9 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(28, 20, "email", "Email", "Topic :: Communications :: Email", True))
self.create_trove_cat((31, 28, "mua", "Email Clients (MUA)",
- "Topic :: Communications :: Email :: Email Clients (MUA)", True))
+ "Topic :: Communications :: Email :: Email Clients (MUA)", True))
self.create_trove_cat((32, 28, "mta", "Mail Transport Agents",
- "Topic :: Communications :: Email :: Mail Transport Agents", True))
+ "Topic :: Communications :: Email :: Mail Transport Agents", True))
self.create_trove_cat(
(234, 18, "other", "Other/Nonlisted Topic", "Topic :: Other/Nonlisted Topic", True))
self.create_trove_cat(
@@ -1035,13 +1064,13 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(75, 129, "financial", "Financial", "Topic :: Office/Business :: Financial", True))
self.create_trove_cat((76, 75, "accounting", "Accounting",
- "Topic :: Office/Business :: Financial :: Accounting", True))
+ "Topic :: Office/Business :: Financial :: Accounting", True))
self.create_trove_cat((77, 75, "investment", "Investment",
- "Topic :: Office/Business :: Financial :: Investment", True))
+ "Topic :: Office/Business :: Financial :: Investment", True))
self.create_trove_cat((78, 75, "spreadsheet", "Spreadsheet",
- "Topic :: Office/Business :: Financial :: Spreadsheet", True))
+ "Topic :: Office/Business :: Financial :: Spreadsheet", True))
self.create_trove_cat((79, 75, "pointofsale", "Point-Of-Sale",
- "Topic :: Office/Business :: Financial :: Point-Of-Sale", True))
+ "Topic :: Office/Business :: Financial :: Point-Of-Sale", True))
self.create_trove_cat(
(130, 129, "scheduling", "Scheduling", "Topic :: Office/Business :: Scheduling", True))
self.create_trove_cat(
@@ -1061,7 +1090,7 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(68, 66, "frontends", "Front-Ends", "Topic :: Database :: Front-Ends", True))
self.create_trove_cat((67, 66, "engines", "Database Engines/Servers",
- "Topic :: Database :: Database Engines/Servers", True))
+ "Topic :: Database :: Database Engines/Servers", True))
self.create_trove_cat(
(43, 18, "security", "Security", "Topic :: Security", True))
self.create_trove_cat(
@@ -1069,23 +1098,24 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(55, 18, "desktop", "Desktop Environment", "Topic :: Desktop Environment", True))
self.create_trove_cat((56, 55, "windowmanagers", "Window Managers",
- "Topic :: Desktop Environment :: Window Managers", True))
+ "Topic :: Desktop Environment :: Window Managers", True))
self.create_trove_cat((59, 56, "enlightenment", "Enlightenment",
- "Topic :: Desktop Environment :: Window Managers :: Enlightenment", True))
+ "Topic :: Desktop Environment :: Window Managers :: Enlightenment", True))
self.create_trove_cat(
- (60, 59, "themes", "Themes", "Topic :: Desktop Environment :: Window Managers :: Enlightenment :: Themes", True))
+ (60, 59, "themes", "Themes", "Topic :: Desktop Environment :: Window Managers :: Enlightenment :: Themes",
+ True))
self.create_trove_cat((57, 55, "kde", "K Desktop Environment (KDE)",
- "Topic :: Desktop Environment :: K Desktop Environment (KDE)", True))
+ "Topic :: Desktop Environment :: K Desktop Environment (KDE)", True))
self.create_trove_cat(
(61, 57, "themes", "Themes", "Topic :: Desktop Environment :: K Desktop Environment (KDE) :: Themes", True))
self.create_trove_cat(
(58, 55, "gnome", "Gnome", "Topic :: Desktop Environment :: Gnome", True))
self.create_trove_cat((62, 55, "screensavers", "Screen Savers",
- "Topic :: Desktop Environment :: Screen Savers", True))
+ "Topic :: Desktop Environment :: Screen Savers", True))
self.create_trove_cat(
(80, 18, "games", "Games/Entertainment", "Topic :: Games/Entertainment", True))
self.create_trove_cat((633, 80, "console-games", "Console-based Games",
- "Topic :: Games/Entertainment :: Console-based Games", True))
+ "Topic :: Games/Entertainment :: Console-based Games", True))
self.create_trove_cat(
(287, 80, "boardgames", "Board Games", "Topic :: Games/Entertainment :: Board Games", True))
self.create_trove_cat(
@@ -1105,13 +1135,13 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(85, 80, "simulation", "Simulation", "Topic :: Games/Entertainment :: Simulation", True))
self.create_trove_cat((86, 80, "mud", "Multi-User Dungeons (MUD)",
- "Topic :: Games/Entertainment :: Multi-User Dungeons (MUD)", True))
+ "Topic :: Games/Entertainment :: Multi-User Dungeons (MUD)", True))
self.create_trove_cat(
(268, 80, "Puzzles", "Puzzle Games", "Topic :: Games/Entertainment :: Puzzle Games", True))
self.create_trove_cat(
(88, 87, "finger", "Finger", "Topic :: Internet :: Finger", True))
self.create_trove_cat((89, 87, "ftp", "File Transfer Protocol (FTP)",
- "Topic :: Internet :: File Transfer Protocol (FTP)", True))
+ "Topic :: Internet :: File Transfer Protocol (FTP)", True))
self.create_trove_cat(
(270, 87, "WAP", "WAP", "Topic :: Internet :: WAP", True))
self.create_trove_cat(
@@ -1119,21 +1149,21 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(91, 90, "browsers", "Browsers", "Topic :: Internet :: WWW/HTTP :: Browsers", True))
self.create_trove_cat((92, 90, "dynamic", "Dynamic Content",
- "Topic :: Internet :: WWW/HTTP :: Dynamic Content", True))
+ "Topic :: Internet :: WWW/HTTP :: Dynamic Content", True))
self.create_trove_cat((95, 92, "messageboards", "Message Boards",
- "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Message Boards", True))
+ "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Message Boards", True))
self.create_trove_cat((96, 92, "cgi", "CGI Tools/Libraries",
- "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries", True))
+ "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries", True))
self.create_trove_cat((94, 92, "counters", "Page Counters",
- "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Page Counters", True))
+ "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Page Counters", True))
self.create_trove_cat((93, 90, "indexing", "Indexing/Search",
- "Topic :: Internet :: WWW/HTTP :: Indexing/Search", True))
+ "Topic :: Internet :: WWW/HTTP :: Indexing/Search", True))
self.create_trove_cat((243, 90, "sitemanagement", "Site Management",
- "Topic :: Internet :: WWW/HTTP :: Site Management", True))
+ "Topic :: Internet :: WWW/HTTP :: Site Management", True))
self.create_trove_cat((244, 243, "linkchecking", "Link Checking",
- "Topic :: Internet :: WWW/HTTP :: Site Management :: Link Checking", True))
+ "Topic :: Internet :: WWW/HTTP :: Site Management :: Link Checking", True))
self.create_trove_cat((250, 90, "httpservers", "HTTP Servers",
- "Topic :: Internet :: WWW/HTTP :: HTTP Servers", True))
+ "Topic :: Internet :: WWW/HTTP :: HTTP Servers", True))
self.create_trove_cat(
(149, 87, "dns", "Name Service (DNS)", "Topic :: Internet :: Name Service (DNS)", True))
self.create_trove_cat(
@@ -1154,19 +1184,19 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(606, 45, "frameworks", "Frameworks", "Topic :: Software Development :: Frameworks", True))
self.create_trove_cat((564, 45, "documentation", "Documentation",
- "Topic :: Software Development :: Documentation", True))
+ "Topic :: Software Development :: Documentation", True))
self.create_trove_cat((562, 45, "swdev_oo", "Object Oriented",
- "Topic :: Software Development :: Object Oriented", True))
+ "Topic :: Software Development :: Object Oriented", True))
self.create_trove_cat((409, 45, "l10n", "L10N (Localization)",
- "Topic :: Software Development :: L10N (Localization)", True))
+ "Topic :: Software Development :: L10N (Localization)", True))
self.create_trove_cat((408, 45, "i18n", "I18N (Internationalization)",
- "Topic :: Software Development :: I18N (Internationalization)", True))
+ "Topic :: Software Development :: I18N (Internationalization)", True))
self.create_trove_cat((50, 45, "objectbrokering", "Object Brokering",
- "Topic :: Software Development :: Object Brokering", True))
+ "Topic :: Software Development :: Object Brokering", True))
self.create_trove_cat(
(51, 50, "corba", "CORBA", "Topic :: Software Development :: Object Brokering :: CORBA", True))
self.create_trove_cat((52, 45, "versioncontrol", "Version Control",
- "Topic :: Software Development :: Version Control", True))
+ "Topic :: Software Development :: Version Control", True))
self.create_trove_cat(
(53, 52, "cvs", "CVS", "Topic :: Software Development :: Version Control :: CVS", True))
self.create_trove_cat(
@@ -1174,15 +1204,15 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(260, 52, "SCCS", "SCCS", "Topic :: Software Development :: Version Control :: SCCS", True))
self.create_trove_cat((259, 45, "codegen", "Code Generators",
- "Topic :: Software Development :: Code Generators", True))
+ "Topic :: Software Development :: Code Generators", True))
self.create_trove_cat(
(47, 45, "debuggers", "Debuggers", "Topic :: Software Development :: Debuggers", True))
self.create_trove_cat(
(48, 45, "compilers", "Compilers", "Topic :: Software Development :: Compilers", True))
self.create_trove_cat((49, 45, "interpreters", "Interpreters",
- "Topic :: Software Development :: Interpreters", True))
+ "Topic :: Software Development :: Interpreters", True))
self.create_trove_cat((561, 45, "softwaredev_ui", "User Interfaces",
- "Topic :: Software Development :: User Interfaces", True))
+ "Topic :: Software Development :: User Interfaces", True))
self.create_trove_cat(
(565, 45, "quality_assurance", "Quality Assurance",
"Topic :: Software Development :: Quality Assurance", True))
@@ -1191,11 +1221,11 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(582, 45, "design", "Design", "Topic :: Software Development :: Design", True))
self.create_trove_cat((593, 45, "cross_compilers", "Cross Compilers",
- "Topic :: Software Development :: Cross Compilers", True))
+ "Topic :: Software Development :: Cross Compilers", True))
self.create_trove_cat(
(603, 45, "profilers", "Profiling", "Topic :: Software Development :: Profiling", True))
self.create_trove_cat((610, 45, "virtual_machines", "Virtual Machines",
- "Topic :: Software Development :: Virtual Machines", True))
+ "Topic :: Software Development :: Virtual Machines", True))
self.create_trove_cat(
(619, 45, "usability", "Usability", "Topic :: Software Development :: Usability", True))
self.create_trove_cat(
@@ -1214,11 +1244,11 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(638, 136, "storage", "Storage", "Topic :: System :: Storage", True))
self.create_trove_cat((601, 638, "file_management", "File Management",
- "Topic :: System :: Storage :: File Management", True))
+ "Topic :: System :: Storage :: File Management", True))
self.create_trove_cat(
(19, 638, "archiving", "Archiving", "Topic :: System :: Storage :: Archiving", True))
self.create_trove_cat((42, 19, "compression", "Compression",
- "Topic :: System :: Storage :: Archiving :: Compression", True))
+ "Topic :: System :: Storage :: Archiving :: Compression", True))
self.create_trove_cat(
(137, 19, "backup", "Backup", "Topic :: System :: Storage :: Archiving :: Backup", True))
self.create_trove_cat(
@@ -1240,9 +1270,11 @@ class CreateTroveCategoriesCommand(base.Command):
(289, 253, "authentication", "Authentication/Directory",
"Topic :: System :: Systems Administration :: Authentication/Directory", True))
self.create_trove_cat(
- (290, 289, "nis", "NIS", "Topic :: System :: Systems Administration :: Authentication/Directory :: NIS", True))
+ (290, 289, "nis", "NIS", "Topic :: System :: Systems Administration :: Authentication/Directory :: NIS",
+ True))
self.create_trove_cat(
- (291, 289, "ldap", "LDAP", "Topic :: System :: Systems Administration :: Authentication/Directory :: LDAP", True))
+ (291, 289, "ldap", "LDAP", "Topic :: System :: Systems Administration :: Authentication/Directory :: LDAP",
+ True))
self.create_trove_cat(
(153, 136, "power", "Power (UPS)", "Topic :: System :: Power (UPS)", True))
self.create_trove_cat(
@@ -1254,13 +1286,13 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(152, 150, "monitoring", "Monitoring", "Topic :: System :: Networking :: Monitoring", True))
self.create_trove_cat((155, 152, "watchdog", "Hardware Watchdog",
- "Topic :: System :: Networking :: Monitoring :: Hardware Watchdog", True))
+ "Topic :: System :: Networking :: Monitoring :: Hardware Watchdog", True))
self.create_trove_cat(
(148, 136, "logging", "Logging", "Topic :: System :: Logging", True))
self.create_trove_cat(
(592, 148, "log_rotation", "Log Rotation", "Topic :: System :: Logging :: Log Rotation", True))
self.create_trove_cat((144, 136, "kernels", "Operating System Kernels",
- "Topic :: System :: Operating System Kernels", True))
+ "Topic :: System :: Operating System Kernels", True))
self.create_trove_cat(
(145, 144, "bsd", "BSD", "Topic :: System :: Operating System Kernels :: BSD", True))
self.create_trove_cat(
@@ -1274,9 +1306,9 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(313, 146, "mainframe", "Mainframes", "Topic :: System :: Hardware :: Mainframes", True))
self.create_trove_cat((312, 146, "smp", "Symmetric Multi-processing",
- "Topic :: System :: Hardware :: Symmetric Multi-processing", True))
+ "Topic :: System :: Hardware :: Symmetric Multi-processing", True))
self.create_trove_cat((292, 146, "drivers", "Hardware Drivers",
- "Topic :: System :: Hardware :: Hardware Drivers", True))
+ "Topic :: System :: Hardware :: Hardware Drivers", True))
self.create_trove_cat(
(138, 136, "benchmark", "Benchmark", "Topic :: System :: Benchmark", True))
self.create_trove_cat(
@@ -1286,7 +1318,7 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(141, 136, "clustering", "Clustering", "Topic :: System :: Clustering", True))
self.create_trove_cat((308, 136, "distributed_computing",
- "Distributed Computing", "Topic :: System :: Distributed Computing", True))
+ "Distributed Computing", "Topic :: System :: Distributed Computing", True))
self.create_trove_cat(
(142, 136, "filesystems", "Filesystems", "Topic :: System :: Filesystems", True))
self.create_trove_cat(
@@ -1294,9 +1326,9 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(87, 18, "internet", "Internet", "Topic :: Internet", True))
self.create_trove_cat((118, 116, "cdripping", "CD Ripping",
- "Topic :: Multimedia :: Sound/Audio :: CD Audio :: CD Ripping", True))
+ "Topic :: Multimedia :: Sound/Audio :: CD Audio :: CD Ripping", True))
self.create_trove_cat((119, 113, "conversion", "Conversion",
- "Topic :: Multimedia :: Sound/Audio :: Conversion", True))
+ "Topic :: Multimedia :: Sound/Audio :: Conversion", True))
self.create_trove_cat(
(120, 113, "editors", "Editors", "Topic :: Multimedia :: Sound/Audio :: Editors", True))
self.create_trove_cat(
@@ -1304,29 +1336,29 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(100, 99, "graphics", "Graphics", "Topic :: Multimedia :: Graphics", True))
self.create_trove_cat((109, 100, "3dmodeling", "3D Modeling",
- "Topic :: Multimedia :: Graphics :: 3D Modeling", True))
+ "Topic :: Multimedia :: Graphics :: 3D Modeling", True))
self.create_trove_cat((110, 100, "3drendering", "3D Rendering",
- "Topic :: Multimedia :: Graphics :: 3D Rendering", True))
+ "Topic :: Multimedia :: Graphics :: 3D Rendering", True))
self.create_trove_cat((111, 100, "presentation", "Presentation",
- "Topic :: Multimedia :: Graphics :: Presentation", True))
+ "Topic :: Multimedia :: Graphics :: Presentation", True))
self.create_trove_cat(
(112, 100, "viewers", "Viewers", "Topic :: Multimedia :: Graphics :: Viewers", True))
self.create_trove_cat(
(101, 100, "capture", "Capture", "Topic :: Multimedia :: Graphics :: Capture", True))
self.create_trove_cat((104, 101, "screencapture", "Screen Capture",
- "Topic :: Multimedia :: Graphics :: Capture :: Screen Capture", True))
+ "Topic :: Multimedia :: Graphics :: Capture :: Screen Capture", True))
self.create_trove_cat((103, 101, "cameras", "Digital Camera",
- "Topic :: Multimedia :: Graphics :: Capture :: Digital Camera", True))
+ "Topic :: Multimedia :: Graphics :: Capture :: Digital Camera", True))
self.create_trove_cat((102, 101, "scanners", "Scanners",
- "Topic :: Multimedia :: Graphics :: Capture :: Scanners", True))
+ "Topic :: Multimedia :: Graphics :: Capture :: Scanners", True))
self.create_trove_cat((105, 100, "conversion", "Graphics Conversion",
- "Topic :: Multimedia :: Graphics :: Graphics Conversion", True))
+ "Topic :: Multimedia :: Graphics :: Graphics Conversion", True))
self.create_trove_cat(
(106, 100, "editors", "Editors", "Topic :: Multimedia :: Graphics :: Editors", True))
self.create_trove_cat((108, 106, "raster", "Raster-Based",
- "Topic :: Multimedia :: Graphics :: Editors :: Raster-Based", True))
+ "Topic :: Multimedia :: Graphics :: Editors :: Raster-Based", True))
self.create_trove_cat((107, 106, "vector", "Vector-Based",
- "Topic :: Multimedia :: Graphics :: Editors :: Vector-Based", True))
+ "Topic :: Multimedia :: Graphics :: Editors :: Vector-Based", True))
self.create_trove_cat(
(97, 18, "scientific", "Scientific/Engineering", "Topic :: Scientific/Engineering", True))
self.create_trove_cat(
@@ -1335,7 +1367,7 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(602, 97, "robotics", "Robotics", "Topic :: Scientific/Engineering :: Robotics", True))
self.create_trove_cat((600, 97, "simulations", "Simulations",
- "Topic :: Scientific/Engineering :: Simulations", True))
+ "Topic :: Scientific/Engineering :: Simulations", True))
self.create_trove_cat(
(568, 97, "ecosystem_sciences", "Ecosystem Sciences",
"Topic :: Scientific/Engineering :: Ecosystem Sciences", True))
@@ -1345,25 +1377,25 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(384, 97, "chemistry", "Chemistry", "Topic :: Scientific/Engineering :: Chemistry", True))
self.create_trove_cat((252, 97, "bioinformatics", "Bio-Informatics",
- "Topic :: Scientific/Engineering :: Bio-Informatics", True))
+ "Topic :: Scientific/Engineering :: Bio-Informatics", True))
self.create_trove_cat(
(246, 97, "eda", "Electronic Design Automation (EDA)",
"Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)", True))
self.create_trove_cat((135, 97, "visualization", "Visualization",
- "Topic :: Scientific/Engineering :: Visualization", True))
+ "Topic :: Scientific/Engineering :: Visualization", True))
self.create_trove_cat(
(134, 97, "astronomy", "Astronomy", "Topic :: Scientific/Engineering :: Astronomy", True))
self.create_trove_cat((133, 97, "ai", "Artificial Intelligence",
- "Topic :: Scientific/Engineering :: Artificial Intelligence", True))
+ "Topic :: Scientific/Engineering :: Artificial Intelligence", True))
self.create_trove_cat(
(591, 133, "intelligent_agents", "Intelligent Agents",
"Topic :: Scientific/Engineering :: Artificial Intelligence :: Intelligent Agents", True))
self.create_trove_cat((98, 97, "mathematics", "Mathematics",
- "Topic :: Scientific/Engineering :: Mathematics", True))
+ "Topic :: Scientific/Engineering :: Mathematics", True))
self.create_trove_cat((272, 97, "HMI", "Human Machine Interfaces",
- "Topic :: Scientific/Engineering :: Human Machine Interfaces", True))
+ "Topic :: Scientific/Engineering :: Human Machine Interfaces", True))
self.create_trove_cat((266, 97, "medical", "Medical Science Apps.",
- "Topic :: Scientific/Engineering :: Medical Science Apps.", True))
+ "Topic :: Scientific/Engineering :: Medical Science Apps.", True))
self.create_trove_cat(
(383, 97, "gis", "GIS", "Topic :: Scientific/Engineering :: GIS", True))
self.create_trove_cat(
@@ -1372,7 +1404,7 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(387, 97, "physics", "Physics", "Topic :: Scientific/Engineering :: Physics", True))
self.create_trove_cat((567, 97, "earth_science", "Earth Sciences",
- "Topic :: Scientific/Engineering :: Earth Sciences", True))
+ "Topic :: Scientific/Engineering :: Earth Sciences", True))
self.create_trove_cat(
(282, 18, "Sociology", "Sociology", "Topic :: Sociology", True))
self.create_trove_cat(
@@ -1390,7 +1422,7 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(125, 99, "video", "Video", "Topic :: Multimedia :: Video", True))
self.create_trove_cat((594, 125, "still_capture", "Still Capture",
- "Topic :: Multimedia :: Video :: Still Capture", True))
+ "Topic :: Multimedia :: Video :: Still Capture", True))
self.create_trove_cat(
(596, 125, "codec", "Codec", "Topic :: Multimedia :: Video :: Codec", True))
self.create_trove_cat(
@@ -1401,12 +1433,12 @@ class CreateTroveCategoriesCommand(base.Command):
(256, 125, "nonlineareditor", "Non-Linear Editor",
"Topic :: Multimedia :: Video :: Non-Linear Editor", True))
self.create_trove_cat((595, 125, "special_effects", "Special Effects",
- "Topic :: Multimedia :: Video :: Special Effects", True))
+ "Topic :: Multimedia :: Video :: Special Effects", True))
self.create_trove_cat(
(623, 125, "video_realtime", "Realtime Processing",
"Topic :: Multimedia :: Video :: Realtime Processing", True))
self.create_trove_cat((126, 125, "vidcapture", "Video Capture",
- "Topic :: Multimedia :: Video :: Video Capture", True))
+ "Topic :: Multimedia :: Video :: Video Capture", True))
self.create_trove_cat(
(113, 99, "sound", "Sound/Audio", "Topic :: Multimedia :: Sound/Audio", True))
self.create_trove_cat(
@@ -1416,41 +1448,44 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(114, 113, "analysis", "Analysis", "Topic :: Multimedia :: Sound/Audio :: Analysis", True))
self.create_trove_cat((115, 113, "capture", "Capture/Recording",
- "Topic :: Multimedia :: Sound/Audio :: Capture/Recording", True))
+ "Topic :: Multimedia :: Sound/Audio :: Capture/Recording", True))
self.create_trove_cat(
(248, 113, "midi", "MIDI", "Topic :: Multimedia :: Sound/Audio :: MIDI", True))
self.create_trove_cat((249, 113, "synthesis", "Sound Synthesis",
- "Topic :: Multimedia :: Sound/Audio :: Sound Synthesis", True))
+ "Topic :: Multimedia :: Sound/Audio :: Sound Synthesis", True))
self.create_trove_cat(
(116, 113, "cdaudio", "CD Audio", "Topic :: Multimedia :: Sound/Audio :: CD Audio", True))
self.create_trove_cat((117, 116, "cdplay", "CD Playing",
- "Topic :: Multimedia :: Sound/Audio :: CD Audio :: CD Playing", True))
+ "Topic :: Multimedia :: Sound/Audio :: CD Audio :: CD Playing", True))
self.create_trove_cat(
(99, 18, "multimedia", "Multimedia", "Topic :: Multimedia", True))
self.create_trove_cat((670, 14, "agpl", "Affero GNU Public License",
- "License :: OSI-Approved Open Source :: Affero GNU Public License", True))
+ "License :: OSI-Approved Open Source :: Affero GNU Public License", True))
self.create_trove_cat((862, 14, "lppl", "LaTeX Project Public License",
- "License :: OSI-Approved Open Source :: LaTeX Project Public License", True))
+ "License :: OSI-Approved Open Source :: LaTeX Project Public License", True))
self.create_trove_cat((655, 432, "win64", "64-bit MS Windows",
- "Operating System :: Grouping and Descriptive Categories :: 64-bit MS Windows", True))
+ "Operating System :: Grouping and Descriptive Categories :: 64-bit MS Windows", True))
self.create_trove_cat(
- (657, 418, "vista", "Vista", "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: Vista", True))
+ (657, 418, "vista", "Vista",
+ "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: Vista", True))
self.create_trove_cat(
- (851, 418, "win7", "Windows 7", "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: Windows 7", True))
+ (851, 418, "win7", "Windows 7",
+ "Operating System :: Modern (Vendor-Supported) Desktop Operating Systems :: Windows 7", True))
self.create_trove_cat(
- (728, 315, "android", "Android", "Operating System :: Handheld/Embedded Operating Systems :: Android", True))
+ (
+ 728, 315, "android", "Android", "Operating System :: Handheld/Embedded Operating Systems :: Android", True))
self.create_trove_cat((780, 315, "ios", "Apple iPhone",
- "Operating System :: Handheld/Embedded Operating Systems :: Apple iPhone", True))
+ "Operating System :: Handheld/Embedded Operating Systems :: Apple iPhone", True))
self.create_trove_cat((863, 534, "architects", "Architects",
- "Intended Audience :: by End-User Class :: Architects", False))
+ "Intended Audience :: by End-User Class :: Architects", False))
self.create_trove_cat(
(864, 534, "auditors", "Auditors", "Intended Audience :: by End-User Class :: Auditors", False))
self.create_trove_cat(
(865, 534, "testers", "Testers", "Intended Audience :: by End-User Class :: Testers", False))
self.create_trove_cat((866, 534, "secpros", "Security Professionals",
- "Intended Audience :: by End-User Class :: Security Professionals", False))
+ "Intended Audience :: by End-User Class :: Security Professionals", False))
self.create_trove_cat((867, 535, "secindustry", "Security",
- "Intended Audience :: by Industry or Sector :: Security", False))
+ "Intended Audience :: by Industry or Sector :: Security", False))
session(M.TroveCategory).flush()
for name in self.migrations:
@@ -1466,7 +1501,7 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(641, 576, "workflow", "Workflow", "Topic :: Office/Business :: Enterprise :: Workflow"))
self.create_trove_cat((642, 292, "linuxdrivers", "Linux",
- "Topic :: System :: Hardware :: Hardware Drivers :: Linux"))
+ "Topic :: System :: Hardware :: Hardware Drivers :: Linux"))
self.create_trove_cat(
(643, 582, "uml", "UML", "Topic :: Software Development :: Design :: UML"))
self.create_trove_cat(
@@ -1474,23 +1509,23 @@ class CreateTroveCategoriesCommand(base.Command):
self.create_trove_cat(
(645, 92, "blogging", "Blogging", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Blogging"))
self.create_trove_cat((646, 52, "subversion", "Subversion",
- "Topic :: Software Development :: Version Control :: Subversion"))
+ "Topic :: Software Development :: Version Control :: Subversion"))
self.create_trove_cat((647, 612, "webservices", "Web Services",
- "Topic :: Formats and P
<TRUNCATED>
[2/4] allura git commit: PEP8 cleanup;
add license header to test_webhooks.py
Posted by br...@apache.org.
http://git-wip-us.apache.org/repos/asf/allura/blob/a3620b4a/Allura/allura/lib/plugin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index a901ba9..fb1c3b9 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -107,8 +107,8 @@ class AuthenticationProvider(object):
self.logout()
return M.User.anonymous()
if not user.is_anonymous() and \
- self.get_last_password_updated(user) > datetime.utcfromtimestamp(self.session.created) and \
- user.get_tool_data('allura', 'pwd_reset_preserve_session') != self.session.id:
+ self.get_last_password_updated(user) > datetime.utcfromtimestamp(self.session.created) and \
+ user.get_tool_data('allura', 'pwd_reset_preserve_session') != self.session.id:
log.debug('Session logged out: due to user %s pwd change %s > %s', user.username,
self.get_last_password_updated(user), datetime.utcfromtimestamp(self.session.created))
self.logout()
@@ -133,7 +133,7 @@ class AuthenticationProvider(object):
:param user_doc: a dict with 'username' and 'display_name'. Optionally 'password' and others
:rtype: :class:`User <allura.model.auth.User>`
'''
- raise NotImplementedError, 'register_user'
+ raise NotImplementedError('register_user')
def _login(self):
'''
@@ -142,7 +142,7 @@ class AuthenticationProvider(object):
:rtype: :class:`User <allura.model.auth.User>`
:raises: HTTPUnauthorized if user not found, or credentials are not valid
'''
- raise NotImplementedError, '_login'
+ raise NotImplementedError('_login')
def login(self, user=None):
try:
@@ -184,23 +184,23 @@ class AuthenticationProvider(object):
:rtype: bool
'''
- raise NotImplementedError, 'validate_password'
+ raise NotImplementedError('validate_password')
def disable_user(self, user, **kw):
'''Disable user account'''
- raise NotImplementedError, 'disable_user'
+ raise NotImplementedError('disable_user')
def enable_user(self, user, **kw):
'''Enable user account'''
- raise NotImplementedError, 'enable_user'
+ raise NotImplementedError('enable_user')
def activate_user(self, user, **kw):
'''Activate user after registration'''
- raise NotImplementedError, 'activate_user'
+ raise NotImplementedError('activate_user')
def deactivate_user(self, user, **kw):
'''Deactivate user (== registation not confirmed)'''
- raise NotImplementedError, 'deactivate_user'
+ raise NotImplementedError('deactivate_user')
def by_username(self, username):
'''
@@ -208,20 +208,20 @@ class AuthenticationProvider(object):
:rtype: :class:`User <allura.model.auth.User>` or None
'''
- raise NotImplementedError, 'by_username'
+ raise NotImplementedError('by_username')
def set_password(self, user, old_password, new_password):
'''
Set a user's password.
- A provider implementing this method should store the timestamp of this change, either on ``user.last_password_updated`` or
- somewhere else that a custom ``get_last_password_updated`` method uses.
+ A provider implementing this method should store the timestamp of this change, either
+ on ``user.last_password_updated`` or somewhere else that a custom ``get_last_password_updated`` method uses.
:param user: a :class:`User <allura.model.auth.User>`
:rtype: None
:raises: HTTPUnauthorized if old_password is not valid
'''
- raise NotImplementedError, 'set_password'
+ raise NotImplementedError('set_password')
def upload_sshkey(self, username, pubkey):
'''
@@ -230,7 +230,7 @@ class AuthenticationProvider(object):
:rtype: None
:raises: AssertionError with user message, upon any error
'''
- raise NotImplementedError, 'upload_sshkey'
+ raise NotImplementedError('upload_sshkey')
def account_navigation(self):
return [
@@ -269,17 +269,17 @@ class AuthenticationProvider(object):
:param user: a :class:`User <allura.model.auth.User>`
:rtype: str
'''
- raise NotImplementedError, 'user_project_shortname'
+ raise NotImplementedError('user_project_shortname')
def user_by_project_shortname(self, shortname):
'''
:param str: shortname
:rtype: user: a :class:`User <allura.model.auth.User>`
'''
- raise NotImplementedError, 'user_by_project_shortname'
+ raise NotImplementedError('user_by_project_shortname')
def update_notifications(self, user):
- raise NotImplementedError, 'update_notifications'
+ raise NotImplementedError('update_notifications')
def user_registration_date(self, user):
'''
@@ -288,7 +288,7 @@ class AuthenticationProvider(object):
:param user: a :class:`User <allura.model.auth.User>`
:rtype: :class:`datetime <datetime.datetime>`
'''
- raise NotImplementedError, 'user_registration_date'
+ raise NotImplementedError('user_registration_date')
def get_last_password_updated(self, user):
'''
@@ -297,7 +297,7 @@ class AuthenticationProvider(object):
:param user: a :class:`User <allura.model.auth.User>`
:rtype: :class:`datetime <datetime.datetime>`
'''
- raise NotImplementedError, 'get_last_password_updated'
+ raise NotImplementedError('get_last_password_updated')
def get_primary_email_address(self, user_record):
return user_record.get_pref('email_address') if user_record else None
@@ -330,7 +330,7 @@ class AuthenticationProvider(object):
Links will show up at admin user search page.
'''
return [
- ('/nf/admin/user/%s' % user.username, 'Details/Edit'),
+ ('/nf/admin/user/%s' % user.username, 'Details/Edit'),
]
@@ -479,7 +479,8 @@ class LdapAuthenticationProvider(AuthenticationProvider):
raise Exception('You should not have both "auth.ldap.autoregister" and '
'"auth.allow_user_registration" set to true')
else:
- log.debug('LdapAuth: autoregister is true, so only creating the mongo record (no creating ldap record)')
+ log.debug('LdapAuth: autoregister is true, so only creating the mongo '
+ 'record (not creating ldap record)')
return result
# full registration into LDAP
@@ -521,7 +522,7 @@ class LdapAuthenticationProvider(AuthenticationProvider):
def upload_sshkey(self, username, pubkey):
if not asbool(config.get('auth.ldap.use_schroot', True)):
- raise NotImplementedError, 'SSH keys are not supported'
+ raise NotImplementedError('SSH keys are not supported')
argv = ('schroot -d / -c %s -u root /ldap-userconfig.py upload %s' % (
config['auth.ldap.schroot_name'], username)).split() + [pubkey]
@@ -574,7 +575,8 @@ class LdapAuthenticationProvider(AuthenticationProvider):
def _login(self):
if ldap is None:
- raise Exception('The python-ldap package needs to be installed. Run `pip install python-ldap` in your allura environment.')
+ raise Exception('The python-ldap package needs to be installed. '
+ 'Run `pip install python-ldap` in your allura environment.')
from allura import model as M
try:
username = str(self.request.params['username'])
@@ -585,7 +587,8 @@ class LdapAuthenticationProvider(AuthenticationProvider):
user = M.User.query.get(username=username)
if user is None:
if asbool(config.get('auth.ldap.autoregister', True)):
- log.debug('LdapAuth: authorized user {} needs a mongo record registered. Creating...'.format(username))
+ log.debug('LdapAuth: authorized user {} needs a mongo record registered. '
+ 'Creating...'.format(username))
user = M.User.register({'username': username,
'display_name': LdapUserPreferencesProvider()._get_pref(username, 'display_name'),
})
@@ -751,7 +754,7 @@ class ProjectRegistrationProvider(object):
from allura import model as M
# Check for private project rights
- if neighborhood.features['private_projects'] == False and private_project:
+ if neighborhood.features['private_projects'] is False and private_project:
raise ValueError(
"You can't create private projects for %s neighborhood" %
neighborhood.name)
@@ -957,8 +960,8 @@ class ProjectRegistrationProvider(object):
Links will show up at admin project search page
'''
return [
- (project.url() + 'admin/groups/', 'Members'),
- (project.url() + 'admin/audit/', 'Audit Trail'),
+ (project.url() + 'admin/groups/', 'Members'),
+ (project.url() + 'admin/audit/', 'Audit Trail'),
]
@@ -1242,7 +1245,7 @@ class UserPreferencesProvider(object):
:return: pref_value
:raises: AttributeError if pref_name not found
'''
- raise NotImplementedError, 'get_pref'
+ raise NotImplementedError('get_pref')
def set_pref(self, user, pref_name, pref_value):
'''
@@ -1250,7 +1253,7 @@ class UserPreferencesProvider(object):
:param str pref_name:
:param pref_value:
'''
- raise NotImplementedError, 'set_pref'
+ raise NotImplementedError('set_pref')
def additional_urls(self):
'''
http://git-wip-us.apache.org/repos/asf/allura/blob/a3620b4a/Allura/allura/model/webhook.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/webhook.py b/Allura/allura/model/webhook.py
index 563f871..d1165ff 100644
--- a/Allura/allura/model/webhook.py
+++ b/Allura/allura/model/webhook.py
@@ -25,7 +25,6 @@ from allura.model import Artifact
class Webhook(Artifact):
-
class __mongometa__:
name = 'webhook'
unique_indexes = [('app_config_id', 'type', 'hook_url')]
http://git-wip-us.apache.org/repos/asf/allura/blob/a3620b4a/Allura/allura/tests/functional/test_auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_auth.py b/Allura/allura/tests/functional/test_auth.py
index b71ffcd..eacabd0 100644
--- a/Allura/allura/tests/functional/test_auth.py
+++ b/Allura/allura/tests/functional/test_auth.py
@@ -309,8 +309,8 @@ class TestAuth(TestController):
ThreadLocalORMSession.flush_all()
self.app.post('/auth/send_verification_link',
- params=dict(a=email_address),
- extra_environ=dict(username='test-user'))
+ params=dict(a=email_address),
+ extra_environ=dict(username='test-user'))
user1 = M.User.query.get(username='test-user-1')
user1.claim_address(email_address)
@@ -324,7 +324,6 @@ class TestAuth(TestController):
email = M.EmailAddress.find(dict(email=email_address, claimed_by_user_id=user._id)).first()
assert not email.confirmed
-
@td.with_user_project('test-admin')
def test_prefs(self):
r = self.app.get('/auth/preferences/',
@@ -777,9 +776,9 @@ class TestPreferences(TestController):
params=dict(socialnetwork=socialnetwork,
accounturl=accounturl))
user = M.User.query.get(username='test-admin')
- assert len(user.socialnetworks) == 1 \
- and user.socialnetworks[0].socialnetwork == socialnetwork \
- and user.socialnetworks[0].accounturl == accounturl
+ assert len(user.socialnetworks) == 1
+ assert_equal(user.socialnetworks[0].socialnetwork, socialnetwork)
+ assert_equal(user.socialnetworks[0].accounturl, accounturl)
# Add second social network account
socialnetwork2 = 'Twitter'
@@ -788,31 +787,31 @@ class TestPreferences(TestController):
params=dict(socialnetwork=socialnetwork2,
accounturl='@test'))
user = M.User.query.get(username='test-admin')
- assert len(user.socialnetworks) == 2 and \
- ({'socialnetwork': socialnetwork, 'accounturl': accounturl} in user.socialnetworks and
- {'socialnetwork': socialnetwork2, 'accounturl': accounturl2} in user.socialnetworks)
+ assert len(user.socialnetworks) == 2
+ assert_in({'socialnetwork': socialnetwork, 'accounturl': accounturl}, user.socialnetworks)
+ assert_in({'socialnetwork': socialnetwork2, 'accounturl': accounturl2}, user.socialnetworks)
# Remove first social network account
self.app.post('/auth/user_info/contacts/remove_social_network',
params=dict(socialnetwork=socialnetwork,
account=accounturl))
user = M.User.query.get(username='test-admin')
- assert len(user.socialnetworks) == 1 and \
- {'socialnetwork': socialnetwork2, 'accounturl': accounturl2} in user.socialnetworks
+ assert len(user.socialnetworks) == 1
+ assert_in({'socialnetwork': socialnetwork2, 'accounturl': accounturl2}, user.socialnetworks)
# Add empty social network account
self.app.post('/auth/user_info/contacts/add_social_network',
params=dict(accounturl=accounturl, socialnetwork=''))
user = M.User.query.get(username='test-admin')
- assert len(user.socialnetworks) == 1 and \
- {'socialnetwork': socialnetwork2, 'accounturl': accounturl2} in user.socialnetworks
+ assert len(user.socialnetworks) == 1
+ assert_in({'socialnetwork': socialnetwork2, 'accounturl': accounturl2}, user.socialnetworks)
# Add invalid social network account
self.app.post('/auth/user_info/contacts/add_social_network',
params=dict(accounturl=accounturl, socialnetwork='invalid'))
user = M.User.query.get(username='test-admin')
- assert len(user.socialnetworks) == 1 and \
- {'socialnetwork': socialnetwork2, 'accounturl': accounturl2} in user.socialnetworks
+ assert len(user.socialnetworks) == 1
+ assert_in({'socialnetwork': socialnetwork2, 'accounturl': accounturl2}, user.socialnetworks)
# Add telephone number
telnumber = '+3902123456'
@@ -886,9 +885,9 @@ class TestPreferences(TestController):
user = M.User.query.get(username='test-admin')
timeslot2dict = dict(week_day=weekday2,
start_time=starttime2, end_time=endtime2)
- assert len(user.availability) == 2 \
- and timeslot1dict in user.get_availability_timeslots() \
- and timeslot2dict in user.get_availability_timeslots()
+ assert len(user.availability) == 2
+ assert_in(timeslot1dict, user.get_availability_timeslots())
+ assert_in(timeslot2dict, user.get_availability_timeslots())
# Remove availability timeslot
r = self.app.post('/auth/user_info/availability/remove_timeslot',
@@ -936,9 +935,9 @@ class TestPreferences(TestController):
enddate=enddate2.strftime('%d/%m/%Y')))
user = M.User.query.get(username='test-admin')
period2dict = dict(start_date=startdate2, end_date=enddate2)
- assert len(user.inactiveperiod) == 2 \
- and period1dict in user.get_inactive_periods() \
- and period2dict in user.get_inactive_periods()
+ assert len(user.inactiveperiod) == 2
+ assert_in(period1dict, user.get_inactive_periods())
+ assert_in(period2dict, user.get_inactive_periods())
# Remove first inactivity period
r = self.app.post(
http://git-wip-us.apache.org/repos/asf/allura/blob/a3620b4a/Allura/allura/tests/test_webhooks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_webhooks.py b/Allura/allura/tests/test_webhooks.py
index fee1556..330c4bd 100644
--- a/Allura/allura/tests/test_webhooks.py
+++ b/Allura/allura/tests/test_webhooks.py
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
import json
import hmac
import hashlib
@@ -37,7 +54,6 @@ with_git2 = td.with_tool(test_project_with_repo, 'git', 'src2', 'Git2')
class TestWebhookBase(object):
-
def setUp(self):
setup_basic_test()
self.patches = self.monkey_patch()
@@ -69,7 +85,6 @@ class TestWebhookBase(object):
class TestValidators(TestWebhookBase):
-
@with_git2
def test_webhook_validator(self):
sender = Mock(type='repo-push')
@@ -107,7 +122,6 @@ class TestValidators(TestWebhookBase):
class TestWebhookController(TestController):
-
def setUp(self):
super(TestWebhookController, self).setUp()
self.patches = self.monkey_patch()
@@ -167,8 +181,8 @@ class TestWebhookController(TestController):
extra_environ={'username': '*anonymous'},
status=302)
assert_equal(r.location,
- 'http://localhost/auth/'
- '?return_to=%2Fadobe%2Fadobe-1%2Fadmin%2Fsrc%2Fwebhooks%2Frepo-push%2F')
+ 'http://localhost/auth/'
+ '?return_to=%2Fadobe%2Fadobe-1%2Fadmin%2Fsrc%2Fwebhooks%2Frepo-push%2F')
def test_invalid_hook_type(self):
self.app.get(self.url + '/invalid-hook-type/', status=404)
@@ -197,7 +211,7 @@ class TestWebhookController(TestController):
with td.out_audits(msg):
r = self.app.post(self.url + '/repo-push/create', data)
self.find_error(r, '_the_form',
- '"repo-push" webhook already exists for Git http://httpbin.org/post')
+ '"repo-push" webhook already exists for Git http://httpbin.org/post')
assert_equal(M.Webhook.query.find().count(), 1)
def test_create_limit_reached(self):
@@ -230,7 +244,7 @@ class TestWebhookController(TestController):
data = {'url': 'qwer', 'secret': 'qwe'}
r = self.app.post(self.url + '/repo-push/create', data)
self.find_error(r, 'url',
- 'You must provide a full domain name (like qwer.com)')
+ 'You must provide a full domain name (like qwer.com)')
def test_edit(self):
data1 = {'url': u'http://httpbin.org/post',
@@ -268,8 +282,8 @@ class TestWebhookController(TestController):
form['url'] = data2['url']
r = form.submit()
self.find_error(r, '_the_form',
- u'"repo-push" webhook already exists for Git http://example.com/hook',
- form_type='edit')
+ u'"repo-push" webhook already exists for Git http://example.com/hook',
+ form_type='edit')
def test_edit_validation(self):
invalid = M.Webhook(
@@ -299,7 +313,7 @@ class TestWebhookController(TestController):
data = {'url': 'qwe', 'secret': 'qwe', 'webhook': str(wh._id)}
r = self.app.post(self.url + '/repo-push/edit', data)
self.find_error(r, 'url',
- 'You must provide a full domain name (like qwe.com)', 'edit')
+ 'You must provide a full domain name (like qwe.com)', 'edit')
def test_delete(self):
data = {'url': u'http://httpbin.org/post',
@@ -375,17 +389,19 @@ class TestWebhookController(TestController):
def link(td):
a = td.find('a')
return {'href': a.get('href'), 'text': a.getText()}
+
def text(td):
return {'text': td.getText()}
+
def delete_btn(td):
a = td.find('a')
return {'href': a.get('href'), 'data-id': a.get('data-id')}
+
tds = row.findAll('td')
return [text(tds[0]), text(tds[1]), link(tds[2]), delete_btn(tds[3])]
class TestSendWebhookHelper(TestWebhookBase):
-
def setUp(self, *args, **kw):
super(TestSendWebhookHelper, self).setUp(*args, **kw)
self.payload = {'some': ['data', 23]}
@@ -490,7 +506,6 @@ class TestSendWebhookHelper(TestWebhookBase):
class TestRepoPushWebhookSender(TestWebhookBase):
-
@patch('allura.webhooks.send_webhook', autospec=True)
def test_send(self, send_webhook):
sender = RepoPushWebhookSender()
@@ -597,10 +612,9 @@ class TestRepoPushWebhookSender(TestWebhookBase):
class TestModels(TestWebhookBase):
-
def test_webhook_url(self):
assert_equal(self.wh.url(),
- '/adobe/adobe-1/admin/src/webhooks/repo-push/{}'.format(self.wh._id))
+ '/adobe/adobe-1/admin/src/webhooks/repo-push/{}'.format(self.wh._id))
def test_webhook_enforce_limit(self):
self.wh.last_sent = None
http://git-wip-us.apache.org/repos/asf/allura/blob/a3620b4a/Allura/allura/webhooks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/webhooks.py b/Allura/allura/webhooks.py
index ba55a89..fc21bf4 100644
--- a/Allura/allura/webhooks.py
+++ b/Allura/allura/webhooks.py
@@ -192,7 +192,6 @@ class WebhookController(BaseController):
class SendWebhookHelper(object):
-
def __init__(self, webhook, payload):
self.webhook = webhook
self.payload = payload
@@ -246,10 +245,10 @@ class SendWebhookHelper(object):
def _send(self, url, data, headers):
try:
r = requests.post(
- url,
- data=data,
- headers=headers,
- timeout=self.timeout)
+ url,
+ data=data,
+ headers=headers,
+ timeout=self.timeout)
except (requests.exceptions.RequestException,
socket.timeout,
ssl.SSLError):
http://git-wip-us.apache.org/repos/asf/allura/blob/a3620b4a/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py b/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py
index 732c5c5..f557e6c 100644
--- a/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py
+++ b/ForgeDiscussion/forgediscussion/tests/functional/test_forum.py
@@ -235,9 +235,8 @@ class TestForumAsync(TestController):
upload_files=[('file_info', 'test.asdfasdtxt',
'This is a textfile')])
r = self.app.post(url + 'attach',
- upload_files=[(
- 'file_info', 'test1.txt', 'This is a textfile'),
- ('file_info', 'test2.txt', 'This is a textfile')])
+ upload_files=[('file_info', 'test1.txt', 'This is a textfile'),
+ ('file_info', 'test2.txt', 'This is a textfile')])
r = self.app.get(url)
assert "test1.txt" in r
assert "test2.txt" in r
@@ -373,11 +372,9 @@ class TestForum(TestController):
if field.has_key('name'):
params[field['name']] = field.has_key(
'value') and field['value'] or ''
- params[f.find('textarea')['name']
- ] = '1st post in Zero Posts thread'
+ params[f.find('textarea')['name']] = '1st post in Zero Posts thread'
params[f.find('select')['name']] = 'testforum'
- params[f.find('input', {'style': 'width: 90%'})
- ['name']] = 'Test Zero Posts'
+ params[f.find('input', {'style': 'width: 90%'})['name']] = 'Test Zero Posts'
r = self.app.post('/discussion/save_new_topic', params=params,
extra_environ=dict(username='*anonymous'),
status=302)
@@ -404,27 +401,23 @@ class TestForum(TestController):
_post_pending()
r = self.app.get('/discussion/testforum/moderate?status=pending')
post_id = r.html.find('input', {'name': 'post-0._id'})['value']
- r = self.app.post('/discussion/testforum/moderate/save_'
- 'moderation', params={
- 'post-0._id': post_id,
- 'post-0.checked': 'on',
- 'delete': 'Delete Marked'})
+ r = self.app.post('/discussion/testforum/moderate/save_moderation', params={
+ 'post-0._id': post_id,
+ 'post-0.checked': 'on',
+ 'delete': 'Delete Marked'})
_check()
def test_posting(self):
r = self.app.get('/discussion/create_topic/')
- f = r.html.find(
- 'form', {'action': '/p/test/discussion/save_new_topic'})
+ f = r.html.find('form', {'action': '/p/test/discussion/save_new_topic'})
params = dict()
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = 'This is a *test thread*'
params[f.find('select')['name']] = 'testforum'
- params[f.find('input', {'style': 'width: 90%'})
- ['name']] = 'Test Thread'
+ params[f.find('input', {'style': 'width: 90%'})['name']] = 'Test Thread'
r = self.app.post('/discussion/save_new_topic', params=params)
r = self.app.get('/admin/discussion/forums')
assert 'Message posted' in r
@@ -445,12 +438,10 @@ class TestForum(TestController):
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = 'Post text'
params[f.find('select')['name']] = 'testforum'
- params[f.find('input', {'style': 'width: 90%'})
- ['name']] = "this is <h2> o'clock"
+ params[f.find('input', {'style': 'width: 90%'})['name']] = "this is <h2> o'clock"
r = self.app.post('/discussion/save_new_topic', params=params)
n = M.Notification.query.find(
dict(subject="[test:discussion] this is <h2> o'clock")).first()
@@ -476,18 +467,15 @@ class TestForum(TestController):
spam_checker.check.return_value = True
self._set_anon_allowed()
r = self.app.get('/discussion/create_topic/')
- f = r.html.find(
- 'form', {'action': '/p/test/discussion/save_new_topic'})
+ f = r.html.find('form', {'action': '/p/test/discussion/save_new_topic'})
params = dict()
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = 'Post content'
params[f.find('select')['name']] = 'testforum'
- params[f.find('input', {'style': 'width: 90%'})
- ['name']] = 'Test Thread'
+ params[f.find('input', {'style': 'width: 90%'})['name']] = 'Test Thread'
thread = self.app.post('/discussion/save_new_topic', params=params,
extra_environ=dict(username='*anonymous')).follow()
@@ -521,25 +509,21 @@ class TestForum(TestController):
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = 'aaa'
params[f.find('select')['name']] = 'testforum'
params[f.find('input', {'style': 'width: 90%'})['name']] = 'AAA'
- thread = self.app.post(
- '/discussion/save_new_topic', params=params).follow()
+ thread = self.app.post('/discussion/save_new_topic', params=params).follow()
url = thread.request.url
# test reply to post
- f = thread.html.find(
- 'div', {'class': 'row reply_post_form'}).find('form')
+ f = thread.html.find('div', {'class': 'row reply_post_form'}).find('form')
rep_url = f.get('action')
params = dict()
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = 'bbb'
thread = self.app.post(str(rep_url), params=params)
thread = self.app.get(url)
@@ -555,15 +539,13 @@ class TestForum(TestController):
# test edit post
thread_url = thread.request.url
r = thread
- reply_form = r.html.find(
- 'div', {'class': 'edit_post_form reply'}).find('form')
+ reply_form = r.html.find('div', {'class': 'edit_post_form reply'}).find('form')
post_link = str(reply_form['action'])
params = dict()
inputs = reply_form.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[reply_form.find('textarea')['name']] = 'zzz'
self.app.post(post_link, params)
r = self.app.get(thread_url)
@@ -573,19 +555,16 @@ class TestForum(TestController):
def test_subscription_controls(self):
r = self.app.get('/discussion/create_topic/')
- f = r.html.find(
- 'form', {'action': '/p/test/discussion/save_new_topic'})
+ f = r.html.find('form', {'action': '/p/test/discussion/save_new_topic'})
params = dict()
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = 'Post text'
params[f.find('select')['name']] = 'testforum'
params[f.find('input', {'style': 'width: 90%'})['name']] = 'Post subject'
- thread = self.app.post(
- '/discussion/save_new_topic', params=params).follow()
+ thread = self.app.post('/discussion/save_new_topic', params=params).follow()
assert M.Notification.query.find(
dict(subject='[test:discussion] Post subject')).count() == 1
r = self.app.get('/discussion/testforum/')
@@ -595,19 +574,16 @@ class TestForum(TestController):
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name') and 'subscription' not in field['name']:
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
self.app.post(str(subscribe_url), params=params)
self.app.get('/discussion/general/subscribe_to_forum?subscribe=True')
- f = thread.html.find(
- 'div', {'class': 'row reply_post_form'}).find('form')
+ f = thread.html.find('div', {'class': 'row reply_post_form'}).find('form')
rep_url = f.get('action')
params = dict()
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = 'Reply 2'
self.app.post(str(rep_url), params=params)
assert M.Notification.query.find(
@@ -627,14 +603,12 @@ class TestForum(TestController):
def test_thread_announcement(self):
r = self.app.get('/discussion/create_topic/')
- f = r.html.find(
- 'form', {'action': '/p/test/discussion/save_new_topic'})
+ f = r.html.find('form', {'action': '/p/test/discussion/save_new_topic'})
params = dict()
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = 'aaa aaa'
params[f.find('select')['name']] = 'testforum'
params[f.find('input', {'style': 'width: 90%'})['name']] = 'AAAA'
@@ -682,14 +656,12 @@ class TestForum(TestController):
def test_thread_sticky(self):
r = self.app.get('/discussion/create_topic/')
- f = r.html.find(
- 'form', {'action': '/p/test/discussion/save_new_topic'})
+ f = r.html.find('form', {'action': '/p/test/discussion/save_new_topic'})
params = dict()
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = 'aaa aaa'
params[f.find('select')['name']] = 'testforum'
params[f.find('input', {'style': 'width: 90%'})['name']] = 'topic1'
@@ -698,14 +670,12 @@ class TestForum(TestController):
tid1 = url1.rstrip('/').rsplit('/', 1)[-1]
r = self.app.get('/discussion/create_topic/')
- f = r.html.find(
- 'form', {'action': '/p/test/discussion/save_new_topic'})
+ f = r.html.find('form', {'action': '/p/test/discussion/save_new_topic'})
params = dict()
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = 'aaa aaa'
params[f.find('select')['name']] = 'testforum'
params[f.find('input', {'style': 'width: 90%'})['name']] = 'topic2'
@@ -745,20 +715,18 @@ class TestForum(TestController):
r = self.app.get('/discussion/testforum/')
rows = self.get_table_rows(r, 'forum_threads')
assert_equal(len(rows), 2)
- #assert 'topic2' in str(rows[0])
- #assert 'topic1' in str(rows[1])
+ # assert 'topic2' in str(rows[0])
+ # assert 'topic1' in str(rows[1])
def test_move_thread(self):
# make the topic
r = self.app.get('/discussion/create_topic/')
- f = r.html.find(
- 'form', {'action': '/p/test/discussion/save_new_topic'})
+ f = r.html.find('form', {'action': '/p/test/discussion/save_new_topic'})
params = dict()
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = 'aaa aaa'
params[f.find('select')['name']] = 'testforum'
params[f.find('input', {'style': 'width: 90%'})['name']] = 'topic1'
@@ -773,8 +741,7 @@ class TestForum(TestController):
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = 'bbb'
thread = self.app.post(str(rep_url), params=params)
thread = self.app.get(url)
@@ -800,19 +767,16 @@ class TestForum(TestController):
assert '<a href="/p/test/discussion/markdown_syntax"><span>Formatting Help</span></a>' in sidebarmenu
assert '<a href="flag_as_spam" class="sidebar_thread_spam"><b data-icon="^" class="ico ico-flag"></b> <span>Mark as Spam</span></a>' not in sidebarmenu
r = self.app.get('/discussion/create_topic/')
- f = r.html.find(
- 'form', {'action': '/p/test/discussion/save_new_topic'})
+ f = r.html.find('form', {'action': '/p/test/discussion/save_new_topic'})
params = dict()
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = 'aaa'
params[f.find('select')['name']] = 'testforum'
params[f.find('input', {'style': 'width: 90%'})['name']] = 'AAA'
- thread = self.app.post(
- '/discussion/save_new_topic', params=params).follow()
+ thread = self.app.post('/discussion/save_new_topic', params=params).follow()
thread_sidebarmenu = str(thread.html.find('div', {'id': 'sidebar'}))
assert '<a href="flag_as_spam" class="sidebar_thread_spam"><b data-icon="^" class="ico ico-flag"></b> <span>Mark as Spam</span></a>' in thread_sidebarmenu
@@ -825,14 +789,12 @@ class TestForum(TestController):
assert '<a href="/p/test/discussion/markdown_syntax"><span>Formatting Help</span></a>' in sidebarmenu
assert '<a href="flag_as_spam" class="sidebar_thread_spam"><b data-icon="^" class="ico ico-flag"></b> <span>Mark as Spam</span></a>' not in sidebarmenu
r = self.app.get('/discussion/create_topic/')
- f = r.html.find(
- 'form', {'action': '/p/test/discussion/save_new_topic'})
+ f = r.html.find('form', {'action': '/p/test/discussion/save_new_topic'})
params = dict()
inputs = f.findAll('input')
for field in inputs:
if field.has_key('name'):
- params[field['name']] = field.has_key(
- 'value') and field['value'] or ''
+ params[field['name']] = field.has_key('value') and field['value'] or ''
params[f.find('textarea')['name']] = 'aaa'
params[f.find('select')['name']] = 'testforum'
params[f.find('input', {'style': 'width: 90%'})['name']] = 'AAA'
@@ -862,8 +824,7 @@ class TestForum(TestController):
r.forms[1].submit()
r = self.app.get('/admin/discussion/forums')
assert u'téstforum'.encode('utf-8') in r
- r = self.app.get(
- u'/p/test/discussion/create_topic/téstforum/'.encode('utf-8'))
+ r = self.app.get(u'/p/test/discussion/create_topic/téstforum/'.encode('utf-8'))
assert u'<option value="téstforum" selected>Tést Forum</option>' in r
@@ -876,24 +837,27 @@ class TestForumStats(TestController):
def test_stats_data(self, aggregate):
# partial data, some days are implicit 0
aggregate.return_value = {'result': [
- {"_id": {
- "year": 2013,
- "month": 1,
- "day": 2},
- "posts": 3
- },
- {"_id": {
- "year": 2013,
- "month": 1,
- "day": 3},
- "posts": 5
- },
- {"_id": {
- "year": 2013,
- "month": 1,
- "day": 5},
- "posts": 2
- },
+ {
+ "_id": {
+ "year": 2013,
+ "month": 1,
+ "day": 2},
+ "posts": 3
+ },
+ {
+ "_id": {
+ "year": 2013,
+ "month": 1,
+ "day": 3},
+ "posts": 5
+ },
+ {
+ "_id": {
+ "year": 2013,
+ "month": 1,
+ "day": 5},
+ "posts": 2
+ },
]}
r = self.app.get(
'/discussion/stats_data?begin=2013-01-01&end=2013-01-06')