2828 '<strong>This text should not be bold</strong>!'
2929])
3030
31+ spcial_submissions = cycle ([
32+ """~!@#$%^&*()_+{}|:"<>?~!@#$%^&*()_+{}|:"<>?~!@#$%^&*()_+{}|:"<>?~!@#$%""" ,
33+ """Ω≈ç√∫˜µ≤≥÷
34+ åß∂ƒ©˙∆˚¬…æ
35+ œ∑´®†¥¨ˆøπ“‘
36+ ¡™£¢∞§¶•ªº–≠
37+ ¸˛Ç◊ı˜Â¯˘¿
38+ ÅÍÎÏ˝ÓÔÒÚÆ☃
39+ Œ„´‰ˇÁ¨ˆØ∏”""" ,
40+ """!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$""" # noqa: W605, E501
41+ """............................................................................................................................ .""" , # noqa: W605, E501
42+
43+ """thisisalongwordwithoutspacesordashesthisisalongwordwithoutspacesordashesthisisalongwordwithoutspacesordashesthisisalongwordwithoutspacesordashesthisisalongwordwithoutspacesordashesthisisalongwordwithoutspacesordashesthisisalongwordwithoutspacesordashesthisisalongwordwithoutspacesordashesthisisalongwordwithoutspacesordashesthisisalongwordwithoutspacesordashesthisisalongwordwithoutspacesordashesthisisalongwordwithoutspacesordashesthisisalongwordwithoutspacesordashesthisisalongwordwithoutspacesordashesthisisalongwordwit💩houtspacesordashes""" , # noqa: W605, E501
44+
45+ """😍😍😍😍🔥🔥🔥🔥🔥🖧Thelastwas3networkedcomuters📟📸longwordwit💩houtspacesordashes""" # noqa: W605, E501
46+
47+
48+
49+ ]
50+ )
51+
3152
3253def main (staging = False ):
3354 app = journalist_app .create_app (config )
@@ -66,6 +87,10 @@ def main(staging=False):
6687 )
6788 continue
6889 create_source_and_submissions (i , num_sources )
90+
91+ client_test = int (os .getenv ('CLIENT_TEST_DATA' , 0 ))
92+ for i in range (1 , client_test ):
93+ create_source_and_submissions (i , client_test , client_test_data = True )
6994 # Now let us delete one journalist
7095 db .session .delete (journalist_tobe_deleted )
7196 db .session .commit ()
@@ -92,7 +117,7 @@ def add_test_user(username, password, otp_secret, is_admin=False,
92117
93118
94119def create_source_and_submissions (
95- source_index , source_count , num_submissions = 2 , num_replies = 2 , journalist_who_replied = None
120+ source_index , source_count , num_submissions = 2 , num_replies = 2 , journalist_who_replied = None , client_test_data = False # noqa: W605, E501
96121):
97122 # Store source in database
98123 codename = current_app .crypto_util .genrandomid ()
@@ -110,11 +135,15 @@ def create_source_and_submissions(
110135 # Generate some test submissions
111136 for _ in range (num_submissions ):
112137 source .interaction_count += 1
138+ if client_test_data :
139+ submission_text = next (spcial_submissions )
140+ else :
141+ submission_text = next (submissions )
113142 fpath = current_app .storage .save_message_submission (
114143 source .filesystem_id ,
115144 source .interaction_count ,
116145 source .journalist_filename ,
117- next ( submissions )
146+ submission_text
118147 )
119148 source .last_updated = datetime .datetime .utcnow ()
120149 submission = Submission (source , fpath )
0 commit comments