Skip to content

Commit

Permalink
add special string replies
Browse files Browse the repository at this point in the history
  • Loading branch information
Allie Crevier committed Jul 6, 2020
1 parent 3955287 commit 46a5d87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
9 changes: 3 additions & 6 deletions securedrop/create-dev-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@
from sdconfig import config
from db import db
from models import Journalist, Reply, Source, Submission
from specialstrings import submissions
from specialstrings import strings


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


def main(staging=False):
Expand Down
18 changes: 3 additions & 15 deletions securedrop/specialstrings.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from itertools import cycle


strings = [
"""This is a test message without markup!""",
"""This is a test message with markup and characters such as \, \\, \', \" and ". """ + # noqa: W605, E501
"""<strong>This text should not be bold</strong>!""",
"""~!@#$%^&*()_+{}|:"<>?~!@#$%^&*()_+{}|:"<>?~!@#$%^&*()_+{}|:"<>?~!@#$%""",
"""Ω≈ç√∫˜µ≤≥÷
åß∂ƒ©˙∆˚¬…æ
Expand Down Expand Up @@ -142,15 +142,3 @@
𝚃𝚑𝚎 𝚚𝚞𝚒𝚌𝚔 𝚋𝚛𝚘𝚠𝚗 𝚏𝚘𝚡 𝚓𝚞𝚖𝚙𝚜 𝚘𝚟𝚎𝚛 𝚝𝚑𝚎 𝚕𝚊𝚣𝚢 𝚍𝚘𝚐
⒯⒣⒠ ⒬⒰⒤⒞⒦ ⒝⒭⒪⒲⒩ ⒡⒪⒳ ⒥⒰⒨⒫⒮ ⒪⒱⒠⒭ ⒯⒣⒠ ⒧⒜⒵⒴ ⒟⒪⒢""", # noqa: W605, E501
]

submission_list = ["""This is a test submission without markup!""",
"""This is a test submission with markup and characters such as \, \\, \', \" and ". """ + # noqa: W605, E501
"""<strong>This text should not be bold</strong>!"""]
submission_list.extend(strings)
submissions = cycle(submission_list)

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

0 comments on commit 46a5d87

Please sign in to comment.