From ff2fdbf1e54683e73e1e6bb660abcdd73261658c Mon Sep 17 00:00:00 2001 From: Hongjing <60866283+chenhongjing@users.noreply.github.com> Date: Wed, 22 May 2024 10:03:12 -0700 Subject: [PATCH] remove coa criterion (#2705) Signed-off-by: Hongjing Chen --- .../services/involuntary_dissolution.py | 10 ---------- .../services/test_involuntary_dissolution.py | 20 ------------------- 2 files changed, 30 deletions(-) diff --git a/legal-api/src/legal_api/services/involuntary_dissolution.py b/legal-api/src/legal_api/services/involuntary_dissolution.py index c3b129e138..a9db046996 100644 --- a/legal-api/src/legal_api/services/involuntary_dissolution.py +++ b/legal-api/src/legal_api/services/involuntary_dissolution.py @@ -63,7 +63,6 @@ def get_businesses_eligible_count(): filter( ~or_( _has_future_effective_filing(), - _has_change_of_address_filing(), _has_delay_of_dissolution_filing(), _is_limited_restored(), _is_xpro_from_nwpta() @@ -151,15 +150,6 @@ def _has_future_effective_filing(): exists() # pylint: disable=protected-access -def _has_change_of_address_filing(): - """Return SQLAlchemy clause for Change of Address filing check. - - Check if the business has Change of Address filings within last 32 days. - """ - coa_date_cutoff = func.coalesce(Business.last_coa_date, DEFAULT_MIN_DATE) + text("""INTERVAL '32 DAYS'""") - return coa_date_cutoff >= func.timezone('UTC', func.now()) - - def _has_delay_of_dissolution_filing(): """Return SQLAlchemy clause for Delay of Dissolution filing check. diff --git a/legal-api/tests/unit/services/test_involuntary_dissolution.py b/legal-api/tests/unit/services/test_involuntary_dissolution.py index ded2e13fd7..bc4dd7e6bf 100644 --- a/legal-api/tests/unit/services/test_involuntary_dissolution.py +++ b/legal-api/tests/unit/services/test_involuntary_dissolution.py @@ -212,26 +212,6 @@ def test_get_businesses_eligible_count_fed_filing(session, test_name, exclude): assert count == 1 -@pytest.mark.parametrize( - 'test_name, exclude', [ - ('COA', True), - ('NO_COA', False) - ] -) -def test_get_businesses_eligible_count_coa_filing(session, test_name, exclude): - """Assert service returns eligible count excluding business which has change of address within last 32 days.""" - bussiness = factory_business(identifier='BC1234567', entity_type=Business.LegalTypes.COMP.value) - if test_name == 'COA': - bussiness.last_coa_date = datetime.utcnow() - bussiness.save() - - count = InvoluntaryDissolutionService.get_businesses_eligible_count() - if exclude: - assert count == 0 - else: - assert count == 1 - - @pytest.mark.parametrize( 'test_name, exclude', [ ('LIMITED_RESTORATION', True),