def test_find_by_registration_id(session): """Assert that find party by registration id contains all expected elements.""" parties = Party.find_by_registration_id(200000000) assert parties assert len(parties) == 5 assert parties[0].party_type_cd == 'RG' assert parties[1].party_type_cd == 'DI' assert parties[2].party_type_cd == 'DB' assert parties[3].party_type_cd == 'SP' assert parties[4].party_type_cd == 'SP'
def test_find_by_reg_id_invalid(session): """Assert that find party by non-existent registration id eturns the expected result.""" parties = Party.find_by_registration_id(300000000) assert not parties