Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(107)

Side by Side Diff: charmworld/qa_questions.py

Issue 47490043: Remove HTML from QA question titles.
Patch Set: Created 11 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « [revision details] ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012, 2013 Canonical Ltd. This software is licensed under the 1 # Copyright 2012, 2013 Canonical Ltd. This software is licensed under the
2 # GNU Affero General Public License version 3 (see the file LICENSE). 2 # GNU Affero General Public License version 3 (see the file LICENSE).
3 3
4 # -*- coding: utf-8 -*- 4 # -*- coding: utf-8 -*-
5 """ 5 """
6 Load qa questions into the collection for populating the scoring parts of 6 Load qa questions into the collection for populating the scoring parts of
7 the quality assessment form. 7 the quality assessment form.
8 8
9 """ 9 """
10 10
11 11
12 def iter_categories(): 12 def iter_categories():
13 """Complete this function with work to be done for the migration/update. 13 """Complete this function with work to be done for the migration/update.
14 14
15 db is the pymongo db instance for our datastore. Charms are in db.charms 15 db is the pymongo db instance for our datastore. Charms are in db.charms
16 for instance. 16 for instance.
17 """ 17 """
18 18
19 # A list of tuples for question categories. 19 # A list of tuples for question categories.
20 # (name, description, questions) 20 # (name, description, questions)
21 # where questions = (description, points, extended_description) 21 # where questions = (description, points, extended_description)
22 22 app_armor_url = 'https://help.ubuntu.com/12.04/serverguide/apparmor.html'
23 initial = [ 23 initial = [
24 ( 24 (
25 u'data_handling', 25 u'data_handling',
26 u'Data Handling', 26 u'Data Handling',
27 [ 27 [
28 (u"Handles the service's user data", 1, 28 (u"Handles the service's user data", 1,
29 u"Gracefully handle the service's user data so that the user " 29 u"Gracefully handle the service's user data so that the user "
30 "doesn't have to manage it separately."), 30 "doesn't have to manage it separately."),
31 31
32 (u'Provides backup mechanism', 1, 32 (u'Provides backup mechanism', 1,
(...skipping 10 matching lines...) Expand all
43 43
44 (u'Provides encryption', 1, 44 (u'Provides encryption', 1,
45 u'Provides encryption of service user data.'), 45 u'Provides encryption of service user data.'),
46 ], 46 ],
47 ), 47 ),
48 48
49 ( 49 (
50 u'secure', 50 u'secure',
51 u'Secure', 51 u'Secure',
52 [ 52 [
53 (u'Contains a well-tested ' 53 (u'Contains a well-tested AppArmor profile', 1,
54 '<a href=' 54 u'These can be provided by the package itself.'
55 '"https://help.ubuntu.com/12.04/serverguide/apparmor.html">' 55 'See the <a href="{}">AppArmor</a> documentation '
56 'AppArmor</a> profile', 1, 56 'for more details.'.format(app_armor_url)),
57 u'These can be provided by the package itself.'),
58 57
59 (u"Doesn't run as root", 1, 58 (u"Doesn't run as root", 1,
60 u'The service should not run as root. Refer to the ' 59 u'The service should not run as root. Refer to the '
61 '<a href="http://upstart.ubuntu.com/cookbook/' 60 '<a href="http://upstart.ubuntu.com/cookbook/'
62 '#run-a-job-as-a-different-user">' 61 '#run-a-job-as-a-different-user">'
63 'Upstart documentation</a> for tips on how to do this.'), 62 'Upstart documentation</a> for tips on how to do this.'),
64 63
65 (u'Per instance or service access control', 1, 64 (u'Per instance or service access control', 1,
66 u'Accept relationships only from trusted instances and/or ' 65 u'Accept relationships only from trusted instances and/or '
67 'services.'), 66 'services.'),
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 'name': name, 192 'name': name,
194 'description': description, 193 'description': description,
195 'questions': [{ 194 'questions': [{
196 'id': '{0}_{1}'.format(name.lower(), i), 195 'id': '{0}_{1}'.format(name.lower(), i),
197 'description': question[0], 196 'description': question[0],
198 'points': question[1], 197 'points': question[1],
199 'extended_description': question[2], 198 'extended_description': question[2],
200 } for i, question in enumerate(questions)] 199 } for i, question in enumerate(questions)]
201 } 200 }
202 yield category_dict 201 yield category_dict
OLDNEW
« no previous file with comments | « [revision details] ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b