Skip to content

Commit

Permalink
Update SB test case
Browse files Browse the repository at this point in the history
  • Loading branch information
pkfec committed Apr 29, 2024
1 parent a522d31 commit 399457a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
20 changes: 10 additions & 10 deletions tests/test_national_party.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,25 +384,25 @@ def test_multiple_two_year_transaction_period(self):
)
self.assertEqual(len(response['results']), 2)

def test_spender_committee_type_filter(self):
def test_spender_committee_designation_filter(self):
[
factories.NationalParty_ScheduleBFactory(spender_committee_type='S'),
factories.NationalParty_ScheduleBFactory(spender_committee_type='S'),
factories.NationalParty_ScheduleBFactory(spender_committee_type='P'),
factories.NationalParty_ScheduleBFactory(spender_committee_designation='A'),
factories.NationalParty_ScheduleBFactory(spender_committee_designation='B'),
factories.NationalParty_ScheduleBFactory(spender_committee_designation='B'),
]
results = self._results(
api.url_for(NationalParty_ScheduleBView, spender_committee_type='S', **self.kwargs)
api.url_for(NationalParty_ScheduleBView, spender_committee_designation='B', **self.kwargs)
)
self.assertEqual(len(results), 2)

def test_spender_org_type_filter(self):
def test_spender_committee_type_filter(self):
[
factories.NationalParty_ScheduleBFactory(spender_committee_org_type='W'),
factories.NationalParty_ScheduleBFactory(spender_committee_org_type='W'),
factories.NationalParty_ScheduleBFactory(spender_committee_org_type='C'),
factories.NationalParty_ScheduleBFactory(spender_committee_type='W'),
factories.NationalParty_ScheduleBFactory(spender_committee_type='W'),
factories.NationalParty_ScheduleBFactory(spender_committee_type='Z'),
]
results = self._results(
api.url_for(NationalParty_ScheduleBView, spender_committee_org_type='W', **self.kwargs)
api.url_for(NationalParty_ScheduleBView, spender_committee_type='W', **self.kwargs)
)
self.assertEqual(len(results), 2)

Expand Down
6 changes: 2 additions & 4 deletions webservices/common/models/national_party.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

class NationalParty_ScheduleA(db.Model):
__table_args__ = {'schema': 'public'}
# __tablename__ = 'ofec_sched_a_national_party_mv'
__tablename__ = 'ofec_sched_a_national_party_mv_tmp_pk'
__tablename__ = 'ofec_sched_a_national_party_mv'

amendment_indicator = db.Column('action_cd', db.String)
amendment_indicator_desc = db.Column('action_cd_desc', db.String)
Expand Down Expand Up @@ -114,8 +113,7 @@ class NationalParty_ScheduleA(db.Model):

class NationalParty_ScheduleB(db.Model):
__table_args__ = {'schema': 'public'}
# __tablename__ = 'ofec_sched_b_national_party_mv'
__tablename__ = 'ofec_sched_b_national_party_mv_tmp_pk'
__tablename__ = 'ofec_sched_b_national_party_mv'

amendment_indicator = db.Column('action_cd', db.String)
amendment_indicator_desc = db.Column('action_cd_desc', db.String)
Expand Down

0 comments on commit 399457a

Please sign in to comment.