@@ -72,12 +72,12 @@ def setUpTestData(cls):
7272 # Create users
7373 cls .reader_user = Dojo_User .objects .create_user (
7474 username = "ra_test_reader" ,
75- password = "testpass123 " ,
75+ password = "testTEST1234!@#$ " ,
7676 is_active = True ,
7777 )
7878 cls .writer_user = Dojo_User .objects .create_user (
7979 username = "ra_test_writer" ,
80- password = "testpass123 " ,
80+ password = "testTEST1234!@#$ " ,
8181 is_active = True ,
8282 )
8383
@@ -170,7 +170,7 @@ def setUpTestData(cls):
170170 # User with Writer on accessible product, no role on inaccessible product
171171 cls .writer_user = Dojo_User .objects .create_user (
172172 username = "meta_batch_writer" ,
173- password = "testpass123 " ,
173+ password = "testTEST1234!@#$ " ,
174174 is_active = True ,
175175 )
176176 Product_Member .objects .create (
@@ -182,7 +182,7 @@ def setUpTestData(cls):
182182 # User with Reader on accessible product (Reader lacks Product_Edit)
183183 cls .reader_user = Dojo_User .objects .create_user (
184184 username = "meta_batch_reader" ,
185- password = "testpass123 " ,
185+ password = "testTEST1234!@#$ " ,
186186 is_active = True ,
187187 )
188188 Product_Member .objects .create (
@@ -250,7 +250,7 @@ def setUpTestData(cls):
250250
251251 cls .user = Dojo_User .objects .create_user (
252252 username = "note_test_owner" ,
253- password = "testpass123 " ,
253+ password = "testTEST1234!@#$ " ,
254254 is_active = True ,
255255 )
256256 Product_Member .objects .create (
@@ -356,7 +356,7 @@ def setUpTestData(cls):
356356 # User with Owner on both products
357357 cls .user = Dojo_User .objects .create_user (
358358 username = "bench_idor_owner" ,
359- password = "testpass123 " ,
359+ password = "testTEST1234!@#$ " ,
360360 is_active = True ,
361361 )
362362 Product_Member .objects .create (
@@ -397,7 +397,7 @@ def setUpTestData(cls):
397397 def test_update_benchmark_cross_product_rejected (self ):
398398 """POSTing a bench_id from product A via product B's URL must be denied."""
399399 client = Client ()
400- client .login (username = "bench_idor_owner" , password = "testpass123 " )
400+ client .login (username = "bench_idor_owner" , password = "testTEST1234!@#$ " )
401401
402402 # Try to update product A's benchmark through product B's endpoint
403403 url = reverse (
@@ -416,7 +416,7 @@ def test_update_benchmark_cross_product_rejected(self):
416416 def test_update_benchmark_summary_cross_product_rejected (self ):
417417 """POSTing a summary from product A via product B's URL must be denied."""
418418 client = Client ()
419- client .login (username = "bench_idor_owner" , password = "testpass123 " )
419+ client .login (username = "bench_idor_owner" , password = "testTEST1234!@#$ " )
420420
421421 url = reverse (
422422 "update_product_benchmark_summary" ,
@@ -433,7 +433,7 @@ def test_update_benchmark_summary_cross_product_rejected(self):
433433 def test_update_benchmark_same_product_allowed (self ):
434434 """POSTing a bench_id for the correct product should succeed."""
435435 client = Client ()
436- client .login (username = "bench_idor_owner" , password = "testpass123 " )
436+ client .login (username = "bench_idor_owner" , password = "testTEST1234!@#$ " )
437437
438438 url = reverse (
439439 "update_product_benchmark" ,
@@ -468,7 +468,7 @@ def setUpTestData(cls):
468468
469469 cls .user = Dojo_User .objects .create_user (
470470 username = "object_parent_owner" ,
471- password = "testpass123 " ,
471+ password = "testTEST1234!@#$ " ,
472472 is_active = True ,
473473 )
474474 Product_Member .objects .create (
@@ -491,22 +491,22 @@ def setUpTestData(cls):
491491 def test_edit_object_cross_product_rejected (self ):
492492 """Editing an object from product A via product B's URL must be denied."""
493493 client = Client ()
494- client .login (username = "object_parent_owner" , password = "testpass123 " )
494+ client .login (username = "object_parent_owner" , password = "testTEST1234!@#$ " )
495495
496496 url = reverse ("edit_object" , args = (self .product_b .id , self .tracked_file .id ))
497497 response = client .get (url )
498498 # PermissionDenied raised; custom handler403 returns 400 (DD bug)
499- self .assertEqual (response .status_code , 404 )
499+ self .assertIn (response .status_code , [ 400 , 403 ] )
500500
501501 def test_delete_object_cross_product_rejected (self ):
502502 """Deleting an object from product A via product B's URL must be denied."""
503503 client = Client ()
504- client .login (username = "object_parent_owner" , password = "testpass123 " )
504+ client .login (username = "object_parent_owner" , password = "testTEST1234!@#$ " )
505505
506506 url = reverse ("delete_object" , args = (self .product_b .id , self .tracked_file .id ))
507507 response = client .get (url )
508508 # PermissionDenied raised; custom handler403 returns 400 (DD bug)
509- self .assertEqual (response .status_code , 404 )
509+ self .assertIn (response .status_code , [ 400 , 403 ] )
510510
511511
512512class TestToolProductParentCheck (DojoTestCase ):
@@ -530,7 +530,7 @@ def setUpTestData(cls):
530530
531531 cls .user = Dojo_User .objects .create_user (
532532 username = "tool_parent_owner" ,
533- password = "testpass123 " ,
533+ password = "testTEST1234!@#$ " ,
534534 is_active = True ,
535535 )
536536 Product_Member .objects .create (
@@ -555,22 +555,22 @@ def setUpTestData(cls):
555555 def test_edit_tool_product_cross_product_rejected (self ):
556556 """Editing a tool setting from product A via product B's URL must be denied."""
557557 client = Client ()
558- client .login (username = "tool_parent_owner" , password = "testpass123 " )
558+ client .login (username = "tool_parent_owner" , password = "testTEST1234!@#$ " )
559559
560560 url = reverse ("edit_tool_product" , args = (self .product_b .id , self .tool_setting .id ))
561561 response = client .get (url )
562562 # PermissionDenied raised; custom handler403 returns 400 (DD bug)
563- self .assertEqual (response .status_code , 404 )
563+ self .assertIn (response .status_code , [ 400 , 403 ] )
564564
565565 def test_delete_tool_product_cross_product_rejected (self ):
566566 """Deleting a tool setting from product A via product B's URL must be denied."""
567567 client = Client ()
568- client .login (username = "tool_parent_owner" , password = "testpass123 " )
568+ client .login (username = "tool_parent_owner" , password = "testTEST1234!@#$ " )
569569
570570 url = reverse ("delete_tool_product" , args = (self .product_b .id , self .tool_setting .id ))
571571 response = client .get (url )
572572 # PermissionDenied raised; custom handler403 returns 400 (DD bug)
573- self .assertEqual (response .status_code , 404 )
573+ self .assertIn (response .status_code , [ 400 , 403 ] )
574574
575575
576576class TestRiskAcceptanceCrossEngagementIDOR (DojoTestCase ):
@@ -588,7 +588,7 @@ def setUpTestData(cls):
588588 )
589589 cls .user = Dojo_User .objects .create_user (
590590 username = "ra_idor_owner" ,
591- password = "testpass123 " ,
591+ password = "testTEST1234!@#$ " ,
592592 is_active = True ,
593593 )
594594 Product_Member .objects .create (
@@ -633,7 +633,7 @@ def setUpTestData(cls):
633633
634634 def _login (self ):
635635 client = Client ()
636- client .login (username = "ra_idor_owner" , password = "testpass123 " )
636+ client .login (username = "ra_idor_owner" , password = "testTEST1234!@#$ " )
637637 return client
638638
639639 def test_view_risk_acceptance_cross_engagement (self ):
@@ -713,7 +713,7 @@ def setUpTestData(cls):
713713
714714 cls .user = Dojo_User .objects .create_user (
715715 username = "preset_idor_owner" ,
716- password = "testpass123 " ,
716+ password = "testTEST1234!@#$ " ,
717717 is_active = True ,
718718 )
719719 Product_Member .objects .create (
@@ -732,7 +732,7 @@ def setUpTestData(cls):
732732
733733 def _login (self ):
734734 client = Client ()
735- client .login (username = "preset_idor_owner" , password = "testpass123 " )
735+ client .login (username = "preset_idor_owner" , password = "testTEST1234!@#$ " )
736736 return client
737737
738738 def test_edit_preset_cross_product (self ):
@@ -779,7 +779,7 @@ def setUpTestData(cls):
779779 )
780780 cls .user = Dojo_User .objects .create_user (
781781 username = "survey_idor_owner" ,
782- password = "testpass123 " ,
782+ password = "testTEST1234!@#$ " ,
783783 is_active = True ,
784784 )
785785 Product_Member .objects .create (
@@ -814,7 +814,7 @@ def setUpTestData(cls):
814814
815815 def _login (self ):
816816 client = Client ()
817- client .login (username = "survey_idor_owner" , password = "testpass123 " )
817+ client .login (username = "survey_idor_owner" , password = "testTEST1234!@#$ " )
818818 return client
819819
820820 def test_view_questionnaire_cross_engagement (self ):
@@ -871,7 +871,7 @@ def setUpTestData(cls):
871871 # Product-level writer (no global permission)
872872 cls .product_writer = Dojo_User .objects .create_user (
873873 username = "template_test_writer" ,
874- password = "testpass123 " ,
874+ password = "testTEST1234!@#$ " ,
875875 is_active = True ,
876876 )
877877 Product_Member .objects .create (
@@ -881,7 +881,7 @@ def setUpTestData(cls):
881881 # Superuser (has global permissions)
882882 cls .superuser = Dojo_User .objects .create_user (
883883 username = "template_test_super" ,
884- password = "testpass123 " ,
884+ password = "testTEST1234!@#$ " ,
885885 is_active = True ,
886886 is_superuser = True ,
887887 )
@@ -917,16 +917,16 @@ def setUpTestData(cls):
917917 def test_product_writer_cannot_access_find_template (self ):
918918 """Product-level Writer without global permission should be denied."""
919919 client = Client ()
920- client .login (username = "template_test_writer" , password = "testpass123 " )
920+ client .login (username = "template_test_writer" , password = "testTEST1234!@#$ " )
921921 url = reverse ("find_template_to_apply" , args = (self .finding .id ,))
922922 response = client .get (url )
923923 # PermissionDenied raised; custom handler403 returns 400 (DD bug)
924- self .assertEqual (response .status_code , 404 )
924+ self .assertIn (response .status_code , [ 400 , 403 ] )
925925
926926 def test_superuser_can_access_find_template (self ):
927927 """Superuser (implicit global permission) should be able to access."""
928928 client = Client ()
929- client .login (username = "template_test_super" , password = "testpass123 " )
929+ client .login (username = "template_test_super" , password = "testTEST1234!@#$ " )
930930 url = reverse ("find_template_to_apply" , args = (self .finding .id ,))
931931 response = client .get (url )
932932 self .assertEqual (response .status_code , 200 )
@@ -949,12 +949,12 @@ def setUpTestData(cls):
949949
950950 cls .reader_user = Dojo_User .objects .create_user (
951951 username = "jira_epic_reader" ,
952- password = "testpass123 " ,
952+ password = "testTEST1234!@#$ " ,
953953 is_active = True ,
954954 )
955955 cls .writer_user = Dojo_User .objects .create_user (
956956 username = "jira_epic_writer" ,
957- password = "testpass123 " ,
957+ password = "testTEST1234!@#$ " ,
958958 is_active = True ,
959959 )
960960
0 commit comments