def get_incomplete_requirements_fields(self, instance): """Returns a list of all the requirement fields that are incomplete.""" return get_incomplete_fields( instance, LARGE_CAPITAL_REQUIREMENTS_FIELDS, LargeCapitalInvestorProfile, )
def get_incomplete_location_fields(self, instance): """Returns a list of all the location fields that are incomplete.""" return get_incomplete_fields( instance, LARGE_CAPITAL_LOCATION_FIELDS, LargeCapitalInvestorProfile, )
def get_incomplete_details_fields(self, instance): """Returns a list of all the detail fields that are incomplete.""" return get_incomplete_fields( instance, LARGE_CAPITAL_DETAILS_FIELDS, LargeCapitalInvestorProfile, )
def test_incomplete_fields(): """Tests incomplete fields on an investor profile are returned.""" instance = LargeCapitalInvestorProfileFactory.build() result = get_incomplete_fields( instance, ['investor_company', 'investor_description'], LargeCapitalInvestorProfile, ) assert result == ['investor_description']