Skip to content

Commit

Permalink
Merge pull request #596 from biocore/csymons_skin_surveys
Browse files Browse the repository at this point in the history
Skin Surveys
  • Loading branch information
cassidysymons authored Feb 12, 2025
2 parents 61d7e1b + 12df590 commit e0f74be
Show file tree
Hide file tree
Showing 6 changed files with 2,047 additions and 31 deletions.
3 changes: 2 additions & 1 deletion microsetta_private_api/api/_survey.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,14 @@ def read_survey_templates(account_id, source_id, language_tag, token_info):
SurveyTemplateRepo.ALLERGIES_ID,
SurveyTemplateRepo.DIET_ID,
SurveyTemplateRepo.DETAILED_DIET_ID,
SurveyTemplateRepo.SKIN_ID,
SurveyTemplateRepo.SKIN_HEALTH_DIAGNOSIS_ID,
SurveyTemplateRepo.OTHER_ID
]
if template_repo.check_display_skin_scoring_app(
account_id, source_id
):
template_ids.append(SurveyTemplateRepo.SKIN_SCORING_APP_ID)

elif source.source_type == Source.SOURCE_TYPE_ANIMAL:
template_ids = [2]
else:
Expand Down
8 changes: 5 additions & 3 deletions microsetta_private_api/api/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ def test_surveys(self):
SurveyTemplateRepo.ALLERGIES_ID,
SurveyTemplateRepo.DIET_ID,
SurveyTemplateRepo.DETAILED_DIET_ID,
SurveyTemplateRepo.SKIN_ID,
SurveyTemplateRepo.SKIN_HEALTH_DIAGNOSIS_ID,
SurveyTemplateRepo.OTHER_ID])
self.assertListEqual([x["survey_template_id"] for x in doggy_surveys],
[2])
Expand Down Expand Up @@ -702,9 +704,9 @@ def test_bobo_takes_all_local_surveys(self):
SurveyTemplateRepo.ALLERGIES_ID,
SurveyTemplateRepo.DIET_ID,
SurveyTemplateRepo.DETAILED_DIET_ID,
SurveyTemplateRepo.MIGRAINE_ID,
SurveyTemplateRepo.SURFERS_ID,
SurveyTemplateRepo.COVID19_ID):
SurveyTemplateRepo.SKIN_ID,
SurveyTemplateRepo.SKIN_HEALTH_DIAGNOSIS_ID,
SurveyTemplateRepo.OTHER_ID):
continue

resp = self.client.get(
Expand Down
Loading

0 comments on commit e0f74be

Please sign in to comment.