Skip to content

Commit

Permalink
Merge pull request #5631 from nyaruka/cleanup_old_domain
Browse files Browse the repository at this point in the history
Replace references to old domain
  • Loading branch information
rowanseymour authored Nov 8, 2024
2 parents 43e84b4 + ec46e7a commit 216964c
Show file tree
Hide file tree
Showing 21 changed files with 665 additions and 665 deletions.
24 changes: 12 additions & 12 deletions temba/api/v2/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,14 +343,14 @@ def test_others(self):
self.assert_field(
fields.UserField(source="test"),
submissions={
"VIEWER@NYARUKA.COM": self.user,
"admin@nyaruka.com": self.admin,
"VIEWER@TEXTIT.COM": self.user,
"admin@textit.com": self.admin,
self.editor.email: serializers.ValidationError, # deleted
self.admin2.email: serializers.ValidationError, # not in org
},
representations={
self.user: {"email": "viewer@nyaruka.com", "name": ""},
self.editor: {"email": "editor@nyaruka.com", "name": "Ed McEdits"},
self.user: {"email": "viewer@textit.com", "name": ""},
self.editor: {"email": "editor@textit.com", "name": "Ed McEdits"},
},
)
self.assert_field(
Expand All @@ -360,7 +360,7 @@ def test_others(self):
self.admin.email: self.admin,
self.agent.email: self.agent,
},
representations={self.agent: {"email": "agent@nyaruka.com", "name": "Agnes"}},
representations={self.agent: {"email": "agent@textit.com", "name": "Agnes"}},
)

def test_serialize_urn(self):
Expand Down Expand Up @@ -4921,7 +4921,7 @@ def test_tickets(self, mr_mocks):
results=[
{
"uuid": str(ticket3.uuid),
"assignee": {"email": "agent@nyaruka.com", "name": "Agnes"},
"assignee": {"email": "agent@textit.com", "name": "Agnes"},
"contact": {"uuid": str(bob.uuid), "name": "Bob"},
"status": "open",
"topic": {"uuid": str(self.org.default_ticket_topic.uuid), "name": "General"},
Expand Down Expand Up @@ -4953,7 +4953,7 @@ def test_tickets(self, mr_mocks):
"topic": {"uuid": str(self.org.default_ticket_topic.uuid), "name": "General"},
"body": None,
"opened_on": format_datetime(ticket1.opened_on),
"opened_by": {"email": "admin@nyaruka.com", "name": "Andy"},
"opened_by": {"email": "admin@textit.com", "name": "Andy"},
"opened_in": None,
"modified_on": format_datetime(ticket1.modified_on),
"closed_on": "2021-01-01T12:30:45.123456Z",
Expand Down Expand Up @@ -5040,7 +5040,7 @@ def test_ticket_actions(self, mr_mocks):
self.assertPost(
endpoint_url,
self.agent,
{"tickets": [str(ticket1.uuid), str(ticket2.uuid)], "action": "assign", "assignee": "agent@nyaruka.com"},
{"tickets": [str(ticket1.uuid), str(ticket2.uuid)], "action": "assign", "assignee": "agent@textit.com"},
status=204,
)

Expand Down Expand Up @@ -5240,31 +5240,31 @@ def test_users(self):
results=[
{
"avatar": None,
"email": "agent@nyaruka.com",
"email": "agent@textit.com",
"first_name": "Agnes",
"last_name": "",
"role": "agent",
"created_on": format_datetime(self.agent.date_joined),
},
{
"avatar": None,
"email": "viewer@nyaruka.com",
"email": "viewer@textit.com",
"first_name": "",
"last_name": "",
"role": "viewer",
"created_on": format_datetime(self.user.date_joined),
},
{
"avatar": None,
"email": "editor@nyaruka.com",
"email": "editor@textit.com",
"first_name": "Ed",
"last_name": "McEdits",
"role": "editor",
"created_on": format_datetime(self.editor.date_joined),
},
{
"avatar": None,
"email": "admin@nyaruka.com",
"email": "admin@textit.com",
"first_name": "Andy",
"last_name": "",
"role": "administrator",
Expand Down
4 changes: 2 additions & 2 deletions temba/api/v2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3389,7 +3389,7 @@ class TicketActionsEndpoint(BulkWriteAPIMixin, BaseEndpoint):
{
"tickets": ["55b6606d-9e89-45d1-a3e2-dc11f19f78df", "bef96b71-865d-480a-a660-33db466a210a"],
"action": "assign",
"assignee": "jim@nyaruka.com"
"assignee": "jim@textit.com"
}
You will receive an empty response with status code 204 if successful.
Expand Down Expand Up @@ -3583,7 +3583,7 @@ class WorkspaceEndpoint(BaseEndpoint):
{
"uuid": "6a44ca78-a4c2-4862-a7d3-2932f9b3a7c3",
"name": "Nyaruka",
"name": "TextIt",
"country": "RW",
"languages": ["eng", "fra"],
"timezone": "Africa/Kigali",
Expand Down
4 changes: 2 additions & 2 deletions temba/channels/types/jasmin/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_claim(self, mock_socket_hostname):
post_data["number"] = "250788123123"
post_data["username"] = "user1"
post_data["password"] = "pass1"
post_data["url"] = "https://nyaruka.com/send"
post_data["url"] = "https://textit.com/send"

response = self.client.post(url, post_data)

Expand Down Expand Up @@ -58,7 +58,7 @@ def test_claim(self, mock_socket_hostname):
post_data["number"] = "200"
post_data["username"] = "user1"
post_data["password"] = "pass1"
post_data["url"] = "https://nyaruka.com/send"
post_data["url"] = "https://textit.com/send"

response = self.client.post(url, post_data)

Expand Down
2 changes: 1 addition & 1 deletion temba/channels/types/kannel/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_claim(self, mock_socket_hostname):

post_data["number"] = "3071"
post_data["country"] = "RW"
post_data["url"] = "http://nyaruka.com/cgi-bin/sendsms"
post_data["url"] = "http://textit.com/cgi-bin/sendsms"
post_data["verify_ssl"] = False
post_data["encoding"] = Channel.ENCODING_SMART

Expand Down
20 changes: 10 additions & 10 deletions temba/channels/types/whatsapp_legacy/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_claim(self, mock_health, mock_socket_hostname):
post_data["username"] = "temba"
post_data["password"] = "tembapasswd"
post_data["country"] = "RW"
post_data["base_url"] = "https://nyaruka.com/whatsapp"
post_data["base_url"] = "https://textit.com/whatsapp"
post_data["facebook_namespace"] = "my-custom-app"
post_data["facebook_business_id"] = "1234"
post_data["facebook_access_token"] = "token123"
Expand Down Expand Up @@ -102,7 +102,7 @@ def test_claim(self, mock_health, mock_socket_hostname):
self.assertEqual("temba", channel.config[Channel.CONFIG_USERNAME])
self.assertEqual("tembapasswd", channel.config[Channel.CONFIG_PASSWORD])
self.assertEqual("abc123", channel.config[Channel.CONFIG_AUTH_TOKEN])
self.assertEqual("https://nyaruka.com/whatsapp", channel.config[Channel.CONFIG_BASE_URL])
self.assertEqual("https://textit.com/whatsapp", channel.config[Channel.CONFIG_BASE_URL])
self.assertNotIn(CONFIG_FB_TEMPLATE_API_VERSION, channel.config)

self.assertEqual("+250788123123", channel.address)
Expand Down Expand Up @@ -198,7 +198,7 @@ def test_duplicate_number_channels(self, mock_health, mock_socket_hostname):
post_data["username"] = "temba"
post_data["password"] = "tembapasswd"
post_data["country"] = "RW"
post_data["base_url"] = "https://nyaruka.com/whatsapp"
post_data["base_url"] = "https://textit.com/whatsapp"
post_data["facebook_namespace"] = "my-custom-app"
post_data["facebook_business_id"] = "1234"
post_data["facebook_access_token"] = "token123"
Expand Down Expand Up @@ -258,7 +258,7 @@ def test_refresh_tokens(self):
"WhatsApp: 1234",
"1234",
config={
Channel.CONFIG_BASE_URL: "https://nyaruka.com/whatsapp",
Channel.CONFIG_BASE_URL: "https://textit.com/whatsapp",
Channel.CONFIG_USERNAME: "temba",
Channel.CONFIG_PASSWORD: "tembapasswd",
Channel.CONFIG_AUTH_TOKEN: "authtoken123",
Expand All @@ -274,7 +274,7 @@ def test_refresh_tokens(self):
"WhatsApp: 1235",
"1235",
config={
Channel.CONFIG_BASE_URL: "https://nyaruka.com/whatsapp",
Channel.CONFIG_BASE_URL: "https://textit.com/whatsapp",
Channel.CONFIG_USERNAME: "temba",
Channel.CONFIG_PASSWORD: "tembapasswd",
Channel.CONFIG_AUTH_TOKEN: "authtoken123",
Expand Down Expand Up @@ -387,7 +387,7 @@ def test_claim_self_hosted_templates(self, mock_health, mock_socket_hostname):
post_data["username"] = "temba"
post_data["password"] = "tembapasswd"
post_data["country"] = "RW"
post_data["base_url"] = "https://nyaruka.com/whatsapp"
post_data["base_url"] = "https://textit.com/whatsapp"
post_data["facebook_namespace"] = "my-custom-app"
post_data["facebook_business_id"] = "1234"
post_data["facebook_access_token"] = "token123"
Expand Down Expand Up @@ -427,7 +427,7 @@ def test_claim_self_hosted_templates(self, mock_health, mock_socket_hostname):
self.assertEqual("temba", channel.config[Channel.CONFIG_USERNAME])
self.assertEqual("tembapasswd", channel.config[Channel.CONFIG_PASSWORD])
self.assertEqual("abc123", channel.config[Channel.CONFIG_AUTH_TOKEN])
self.assertEqual("https://nyaruka.com/whatsapp", channel.config[Channel.CONFIG_BASE_URL])
self.assertEqual("https://textit.com/whatsapp", channel.config[Channel.CONFIG_BASE_URL])
self.assertEqual("v3.3", channel.config[CONFIG_FB_TEMPLATE_API_VERSION])

self.assertEqual("+250788123123", channel.address)
Expand All @@ -442,7 +442,7 @@ def test_fetch_templates(self, mock_get):
"WhatsApp: 1234",
"1234",
config={
Channel.CONFIG_BASE_URL: "https://nyaruka.com/whatsapp",
Channel.CONFIG_BASE_URL: "https://textit.com/whatsapp",
Channel.CONFIG_USERNAME: "temba",
Channel.CONFIG_PASSWORD: "tembapasswd",
Channel.CONFIG_AUTH_TOKEN: "authtoken123",
Expand Down Expand Up @@ -513,7 +513,7 @@ def test_check_health(self):
"WhatsApp: 1234",
"1234",
config={
Channel.CONFIG_BASE_URL: "https://nyaruka.com/whatsapp",
Channel.CONFIG_BASE_URL: "https://textit.com/whatsapp",
Channel.CONFIG_USERNAME: "temba",
Channel.CONFIG_PASSWORD: "tembapasswd",
Channel.CONFIG_AUTH_TOKEN: "authtoken123",
Expand All @@ -536,7 +536,7 @@ def test_check_health(self):

channel.type.check_health(channel)
mock_get.assert_called_with(
"https://nyaruka.com/whatsapp/v1/health", headers={"Authorization": "Bearer authtoken123"}
"https://textit.com/whatsapp/v1/health", headers={"Authorization": "Bearer authtoken123"}
)
with self.assertRaises(Exception):
channel.type.check_health(channel)
4 changes: 2 additions & 2 deletions temba/contacts/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2435,7 +2435,7 @@ def assertHistoryEvent(events, index, expected_type, **kwargs):
assertHistoryEvent(history, 9, "flow_entered", flow__name="Colors")
assertHistoryEvent(history, 10, "msg_received", msg__text="Message caption")
assertHistoryEvent(
history, 11, "msg_created", msg__text="A beautiful broadcast", created_by__email="viewer@nyaruka.com"
history, 11, "msg_created", msg__text="A beautiful broadcast", created_by__email="viewer@textit.com"
)
assertHistoryEvent(history, 12, "campaign_fired", campaign__name="Planting Reminders")
assertHistoryEvent(history, -1, "msg_received", msg__text="Inbound message 11")
Expand Down Expand Up @@ -2579,7 +2579,7 @@ def test_history_session_events(self):
.set_contact_name("Joe")
.set_contact_name("")
.set_result("Color", "red", "Red", "it's red")
.send_email(["joe@nyaruka.com"], "Test", "Hello there Joe")
.send_email(["joe@textit.com"], "Test", "Hello there Joe")
.error("unable to send email")
.fail("this is a failure")
.save()
Expand Down
2 changes: 1 addition & 1 deletion temba/flows/legacy/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ def test_migrate_sample_flows(self):
email_node = order_checker.get_definition()["nodes"][10]
email_action = email_node["actions"][1]

self.assertEqual(["admin@nyaruka.com"], email_action["addresses"])
self.assertEqual(["admin@textit.com"], email_action["addresses"])

def test_migrate_bad_group_names(self):
# This test makes sure that bad contact groups (< 25, etc) are migrated forward properly.
Expand Down
8 changes: 4 additions & 4 deletions temba/flows/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2168,14 +2168,14 @@ def test_fetch_revisions(self):
self.assertEqual(
[
{
"user": {"email": "admin@nyaruka.com", "name": "Andy"},
"user": {"email": "admin@textit.com", "name": "Andy"},
"created_on": matchers.ISODate(),
"id": revisions[0].id,
"version": Flow.CURRENT_SPEC_VERSION,
"revision": 2,
},
{
"user": {"email": "admin@nyaruka.com", "name": "Andy"},
"user": {"email": "admin@textit.com", "name": "Andy"},
"created_on": matchers.ISODate(),
"id": revisions[1].id,
"version": "11.12",
Expand Down Expand Up @@ -5167,7 +5167,7 @@ def test_simulation_ivr(self):
"redaction_policy": "none",
"input_collation": "default",
},
"user": {"email": "admin@nyaruka.com", "name": "Andy"},
"user": {"email": "admin@textit.com", "name": "Andy"},
},
json.loads(mock_post.call_args[1]["data"])["trigger"],
)
Expand Down Expand Up @@ -5346,7 +5346,7 @@ def test_list(self):
self.assertContains(response, "Test Flow 1")
self.assertNotContains(response, "Test Flow 2")
self.assertContains(response, "A deleted flow")
self.assertContains(response, "was started by admin@nyaruka.com")
self.assertContains(response, "was started by admin@textit.com")
self.assertContains(response, "was started by an API call")
self.assertContains(response, "was started by Zapier")
self.assertContains(response, "Not in a flow")
Expand Down
8 changes: 4 additions & 4 deletions temba/mailroom/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def test_from_msg(self):
},
"created_by": {
"id": self.agent.id,
"email": "agent@nyaruka.com",
"email": "agent@textit.com",
"first_name": "Agnes",
"last_name": "",
},
Expand Down Expand Up @@ -331,7 +331,7 @@ def test_from_msg(self):
},
"created_by": {
"id": self.admin.id,
"email": "admin@nyaruka.com",
"email": "admin@textit.com",
"first_name": "Andy",
"last_name": "",
},
Expand Down Expand Up @@ -365,7 +365,7 @@ def test_from_msg(self):
},
"created_by": {
"id": self.admin.id,
"email": "admin@nyaruka.com",
"email": "admin@textit.com",
"first_name": "Andy",
"last_name": "",
},
Expand Down Expand Up @@ -537,7 +537,7 @@ def test_from_ticket_event(self):
"id": self.agent.id,
"first_name": "Agnes",
"last_name": "",
"email": "agent@nyaruka.com",
"email": "agent@textit.com",
},
},
Event.from_ticket_event(self.org, self.user, event1),
Expand Down
Loading

0 comments on commit 216964c

Please sign in to comment.