Skip to content

Commit

Permalink
remove coa criterion (bcgov#2705)
Browse files Browse the repository at this point in the history
Signed-off-by: Hongjing Chen <[email protected]>
  • Loading branch information
chenhongjing authored May 22, 2024
1 parent c539f6a commit ff2fdbf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
10 changes: 0 additions & 10 deletions legal-api/src/legal_api/services/involuntary_dissolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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.
Expand Down
20 changes: 0 additions & 20 deletions legal-api/tests/unit/services/test_involuntary_dissolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit ff2fdbf

Please sign in to comment.