@@ -94,7 +94,26 @@ def test_get_tasks_no_filings(session, client, jwt):
9494
9595 rv = client .get (f'/api/v2/businesses/{ identifier } /tasks' , headers = create_header (jwt , [STAFF_ROLE ], identifier ))
9696 assert rv .status_code == HTTPStatus .OK
97- assert num_filings_owed == len (rv .json .get ('tasks' ))
97+ assert len (rv .json .get ('tasks' )) == num_filings_owed
98+
99+
100+ def test_get_tasks_sentinel_founding_date_skips_ar (session , client , jwt ):
101+ """Assert COLIN year-1 sentinel founding date does not generate thousands of AR todos."""
102+ identifier = 'BC1234567'
103+ factory_business (
104+ identifier ,
105+ founding_date = datetime (1 , 1 , 1 , 8 , 0 , 0 , tzinfo = UTC ),
106+ entity_type = Business .LegalTypes .COMP .value ,
107+ state = Business .State .ACTIVE ,
108+ )
109+
110+ rv = client .get (f'/api/v2/businesses/{ identifier } /tasks' , headers = create_header (jwt , [STAFF_ROLE ], identifier ))
111+ assert rv .status_code == HTTPStatus .OK
112+ ar_tasks = [
113+ t for t in rv .json .get ('tasks' )
114+ if t .get ('task' , {}).get ('todo' , {}).get ('header' , {}).get ('name' ) == 'annualReport'
115+ ]
116+ assert len (ar_tasks ) == 0
98117
99118
100119def test_get_tasks_next_year (session , client , jwt ):
@@ -107,7 +126,7 @@ def test_get_tasks_next_year(session, client, jwt):
107126
108127 rv = client .get (f'/api/v2/businesses/{ identifier } /tasks' , headers = create_header (jwt , [STAFF_ROLE ], identifier ))
109128 assert rv .status_code == HTTPStatus .OK
110- assert 1 == len (rv .json .get ('tasks' ))
129+ assert len (rv .json .get ('tasks' )) == 1
111130
112131
113132def test_bcorps_get_tasks_no_filings (session , client , jwt ):
0 commit comments