Skip to content

Commit

Permalink
Merge pull request #673 from praekeltfoundation/location-survey
Browse files Browse the repository at this point in the history
Save location group to flow results
  • Loading branch information
erikh360 authored Aug 21, 2023
2 parents 2b64b5a + d5cdfa7 commit b140f7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions yal/surveys/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ async def state_location_introduction(self):
"ejaf_location_survey_status", "not_invited"
)
survey_group = self.user.metadata.get("ejaf_location_survey_group")
self.save_answer("ejaf_location_survey_group", survey_group)

error, group_count = await rapidpro.get_group_membership_count(
group_name=f"EJAF location survey completed {survey_group}"
)
Expand Down
4 changes: 2 additions & 2 deletions yal/tests/surveys/test_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
from vaccine.models import Message
from vaccine.testing import AppTester, TState, run_sanic
from yal import config

# TODO: fix this import once this flow is hooked up in main application
from yal.main import Application


Expand Down Expand Up @@ -177,6 +175,8 @@ async def test_state_location_introduction_pending(tester: AppTester):
)
)

tester.assert_answer("ejaf_location_survey_group", "1")


@pytest.mark.asyncio
async def test_state_location_decline(tester: AppTester):
Expand Down

0 comments on commit b140f7b

Please sign in to comment.