Skip to content

Commit 46a5d87

Browse files
author
Allie Crevier
committed
add special string replies
1 parent 3955287 commit 46a5d87

2 files changed

Lines changed: 6 additions & 21 deletions

File tree

securedrop/create-dev-data.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,11 @@
1515
from sdconfig import config
1616
from db import db
1717
from models import Journalist, Reply, Source, Submission
18-
from specialstrings import submissions
18+
from specialstrings import strings
1919

2020

21-
replies = cycle([
22-
'This is a test reply without markup!',
23-
'This is a test reply with markup and characters such as \, \\, \', \" and ". ' + # noqa: W605, E501
24-
'<strong>This text should not be bold</strong>!'
25-
])
21+
submissions = cycle(strings)
22+
replies = cycle(strings)
2623

2724

2825
def main(staging=False):

securedrop/specialstrings.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from itertools import cycle
2-
3-
41
strings = [
2+
"""This is a test message without markup!""",
3+
"""This is a test message with markup and characters such as \, \\, \', \" and ". """ + # noqa: W605, E501
4+
"""<strong>This text should not be bold</strong>!""",
55
"""~!@#$%^&*()_+{}|:"<>?~!@#$%^&*()_+{}|:"<>?~!@#$%^&*()_+{}|:"<>?~!@#$%""",
66
"""Ω≈ç√∫˜µ≤≥÷
77
åß∂ƒ©˙∆˚¬…æ
@@ -142,15 +142,3 @@
142142
𝚃𝚑𝚎 𝚚𝚞𝚒𝚌𝚔 𝚋𝚛𝚘𝚠𝚗 𝚏𝚘𝚡 𝚓𝚞𝚖𝚙𝚜 𝚘𝚟𝚎𝚛 𝚝𝚑𝚎 𝚕𝚊𝚣𝚢 𝚍𝚘𝚐
143143
⒯⒣⒠ ⒬⒰⒤⒞⒦ ⒝⒭⒪⒲⒩ ⒡⒪⒳ ⒥⒰⒨⒫⒮ ⒪⒱⒠⒭ ⒯⒣⒠ ⒧⒜⒵⒴ ⒟⒪⒢""", # noqa: W605, E501
144144
]
145-
146-
submission_list = ["""This is a test submission without markup!""",
147-
"""This is a test submission with markup and characters such as \, \\, \', \" and ". """ + # noqa: W605, E501
148-
"""<strong>This text should not be bold</strong>!"""]
149-
submission_list.extend(strings)
150-
submissions = cycle(submission_list)
151-
152-
replies_list = ['This is a test reply without markup!',
153-
'This is a test reply with markup and characters such as \, \\, \', \" and ". ' + # noqa: W605, E501
154-
'<strong>This text should not be bold</strong>!']
155-
replies_list.extend(strings)
156-
replies = cycle(replies_list)

0 commit comments

Comments
 (0)