Skip to content

Commit

Permalink
Updates after feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzbrand committed Oct 24, 2024
1 parent 165fac8 commit f54b07e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM ghcr.io/praekeltfoundation/docker-django-bootstrap-nw:py3.9-bullseye

RUN pip install poetry==1.8.3
ENV DJANGO_SETTINGS_MODULE "ndoh_hub.settings"

COPY . /app

RUN pip install poetry
RUN poetry config virtualenvs.create false \
&& poetry install --no-dev --no-interaction --no-ansi --no-cache

Expand Down
12 changes: 6 additions & 6 deletions eventstore/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1289,9 +1289,9 @@ def test_successful_inbound_messages_request(self, mock_handle_inbound):
datetime.datetime(2018, 2, 15, 11, 38, 20, tzinfo=UTC),
),
)
(self.assertEqual(messages.id, "9e12d04c-af25-40b6-aa4f-57c72e8e3f91"),)
(self.assertEqual(messages.type, "image"),)
(self.assertEqual(messages.message_direction, Message.INBOUND),)
self.assertEqual(messages.id, "9e12d04c-af25-40b6-aa4f-57c72e8e3f91")
self.assertEqual(messages.type, "image")
self.assertEqual(messages.message_direction, Message.INBOUND)
(
self.assertEqual(
messages.data,
Expand Down Expand Up @@ -1395,9 +1395,9 @@ def test_successful_outbound_messages_request(self, mock_handle_outbound):
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
[messages] = Message.objects.all()
self.assertEqual(str(messages.contact_id), "whatsapp-id")
(self.assertEqual(messages.id, "message-id"),)
(self.assertEqual(messages.type, "text"),)
(self.assertEqual(messages.message_direction, Message.OUTBOUND),)
self.assertEqual(messages.id, "message-id")
self.assertEqual(messages.type, "text")
self.assertEqual(messages.message_direction, Message.OUTBOUND)
(
self.assertEqual(
messages.data,
Expand Down
2 changes: 1 addition & 1 deletion eventstore/tests/test_whatsapp_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def test_handle_edd_label_disabled(self):

with patch("eventstore.whatsapp_actions.handle_edd_message") as handle:
handle_inbound(message)
_var = handle.assert_not_called
handle.assert_not_called()


class UpdateRapidproAlertOptoutTests(DjangoTestCase):
Expand Down
2 changes: 1 addition & 1 deletion scripts/growgreat_extract/msisdn_from_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

def get_msisdn(details):
last = None
for addr, _addr_dets in details.get("addresses", {}).get("msisdn", {}).items():
for addr in details.get("addresses", {}).get("msisdn", {}):
if details.get("default") is True:
return addr
if details.get("optedout") is not True:
Expand Down

0 comments on commit f54b07e

Please sign in to comment.