def test_find_by_registration_id(session): """Assert that find general collateral by registration id contains all expected elements.""" collateral = GeneralCollateral.find_by_registration_id(200000000) assert collateral assert len(collateral) == 2 assert collateral[0].collateral_id assert collateral[0].registration_id assert collateral[0].financing_id assert collateral[0].description assert collateral[1].collateral_id assert collateral[1].registration_id assert collateral[1].financing_id assert collateral[1].description
def test_find_by_reg_id_invalid(session): """Assert that find general collateral by non-existent registration ID returns the expected result.""" collateral = GeneralCollateral.find_by_registration_id(300000000) assert not collateral