@@ -511,6 +511,9 @@ def test_project_choice_filtering(self):
511511 org_coe = Organization .objects .create (name = 'CoE' )
512512 org_coe .save ()
513513
514+ org_other = Organization .objects .create (name = 'Other' )
515+ org_other .save ()
516+
514517 accounting_code = AccountingCode .objects .get (pk = 1 )
515518
516519 project_18f = Project .objects .create (
@@ -527,6 +530,13 @@ def test_project_choice_filtering(self):
527530 )
528531 project_coe .save ()
529532
533+ project_other = Project .objects .create (
534+ name = 'a project with a non-18F/CoE org' ,
535+ accounting_code = accounting_code ,
536+ organization = org_other
537+ )
538+ project_other .save ()
539+
530540 project_none = Project .objects .create (
531541 name = 'a project with no org assignment' ,
532542 accounting_code = accounting_code ,
@@ -553,18 +563,23 @@ def test_project_choice_filtering(self):
553563
554564 project_18f_found = False
555565 project_coe_found = False
566+ project_other_found = False
556567 project_none_found = False
557568 str_formset = str (response .context ['formset' ]).split ('\n ' )
558569 for line in str_formset :
559570 if line .find (f'option value="{ project_18f .id } "' ) > 0 :
560571 project_18f_found = True
561572 if line .find (f'option value="{ project_coe .id } "' ) > 0 :
562573 project_coe_found = True
574+ if line .find (f'option value="{ project_other .id } "' ) > 0 :
575+ project_other_found = True
563576 if line .find (f'option value="{ project_none .id } "' ) > 0 :
564577 project_none_found = True
565578
566579 self .assertTrue (project_18f_found )
567- self .assertFalse (project_coe_found )
580+ # special cased to now show CoE projects too!!
581+ self .assertTrue (project_coe_found )
582+ self .assertFalse (project_other_found )
568583 self .assertTrue (project_none_found )
569584
570585 def test_holiday_prefill (self ):
0 commit comments