tests: Remove ignored parameters from push notifications tests.

Removes `token_kind` parameter being passed to
`remove_apns_device_token` and `remove_android_reg_id` code
paths / endpoints. Possibly missed in a refactor of this
function as the tests for adding these tokens do not pass
a `token_kind` parameter.

Removes `zulip_org_id` and `zulip_org_kay` from code testing
`deactivate_remote_server`. These parameters are passed when
a remote server is added, so possibly a copy and paste error
when these tests were written / last refactored.
This commit is contained in:
Lauryn Menard 2022-04-07 17:53:37 +02:00 committed by Tim Abbott
parent 195a86f242
commit 2615eacca5
1 changed files with 2 additions and 7 deletions

View File

@ -522,9 +522,7 @@ class PushBouncerNotificationTest(BouncerTestCase):
# Remove tokens
for endpoint, token, kind in endpoints:
result = self.client_delete(
endpoint, {"token": token, "token_kind": kind}, subdomain="zulip"
)
result = self.client_delete(endpoint, {"token": token}, subdomain="zulip")
self.assert_json_success(result)
tokens = list(
RemotePushDeviceToken.objects.filter(
@ -2567,10 +2565,7 @@ class PushBouncerSignupTest(ZulipTestCase):
self.assertEqual(server.hostname, "example.com")
self.assertEqual(server.contact_email, "server-admin@example.com")
request = dict(zulip_org_id=zulip_org_id, zulip_org_key=zulip_org_key)
result = self.uuid_post(
zulip_org_id, "/api/v1/remotes/server/deactivate", request, subdomain=""
)
result = self.uuid_post(zulip_org_id, "/api/v1/remotes/server/deactivate", subdomain="")
self.assert_json_success(result)
server = RemoteZulipServer.objects.get(uuid=zulip_org_id)