Skip to content

Commit

Permalink
Merge pull request #533 from delirious-lettuce/fix_shadowed_builtins
Browse files Browse the repository at this point in the history
Fix shadowed builtins, `id` -> `id_`
  • Loading branch information
thinkingserious authored May 30, 2018
2 parents 8088e8d + c206553 commit deefcd6
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
40 changes: 20 additions & 20 deletions examples/whitelabel/whitelabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
data = {
"ip": "192.168.0.1"
}
id = "test_url_param"
response = sg.client.whitelabel.domains._(id).ips.post(request_body=data)
id_ = "test_url_param"
response = sg.client.whitelabel.domains._(id_).ips.post(request_body=data)
print(response.status_code)
print(response.body)
print(response.headers)
Expand All @@ -129,9 +129,9 @@
# Remove an IP from a domain whitelabel. #
# DELETE /whitelabel/domains/{id}/ips/{ip} #

id = "test_url_param"
id_ = "test_url_param"
ip = "test_url_param"
response = sg.client.whitelabel.domains._(id).ips._(ip).delete()
response = sg.client.whitelabel.domains._(id_).ips._(ip).delete()
print(response.status_code)
print(response.body)
print(response.headers)
Expand All @@ -140,8 +140,8 @@
# Validate a domain whitelabel. #
# POST /whitelabel/domains/{id}/validate #

id = "test_url_param"
response = sg.client.whitelabel.domains._(id).validate.post()
id_ = "test_url_param"
response = sg.client.whitelabel.domains._(id_).validate.post()
print(response.status_code)
print(response.body)
print(response.headers)
Expand Down Expand Up @@ -174,8 +174,8 @@
# Retrieve an IP whitelabel #
# GET /whitelabel/ips/{id} #

id = "test_url_param"
response = sg.client.whitelabel.ips._(id).get()
id_ = "test_url_param"
response = sg.client.whitelabel.ips._(id_).get()
print(response.status_code)
print(response.body)
print(response.headers)
Expand All @@ -184,8 +184,8 @@
# Delete an IP whitelabel #
# DELETE /whitelabel/ips/{id} #

id = "test_url_param"
response = sg.client.whitelabel.ips._(id).delete()
id_ = "test_url_param"
response = sg.client.whitelabel.ips._(id_).delete()
print(response.status_code)
print(response.body)
print(response.headers)
Expand All @@ -194,8 +194,8 @@
# Validate an IP whitelabel #
# POST /whitelabel/ips/{id}/validate #

id = "test_url_param"
response = sg.client.whitelabel.ips._(id).validate.post()
id_ = "test_url_param"
response = sg.client.whitelabel.ips._(id_).validate.post()
print(response.status_code)
print(response.body)
print(response.headers)
Expand Down Expand Up @@ -263,8 +263,8 @@
data = {
"default": True
}
id = "test_url_param"
response = sg.client.whitelabel.links._(id).patch(request_body=data)
id_ = "test_url_param"
response = sg.client.whitelabel.links._(id_).patch(request_body=data)
print(response.status_code)
print(response.body)
print(response.headers)
Expand All @@ -273,8 +273,8 @@
# Retrieve a Link Whitelabel #
# GET /whitelabel/links/{id} #

id = "test_url_param"
response = sg.client.whitelabel.links._(id).get()
id_ = "test_url_param"
response = sg.client.whitelabel.links._(id_).get()
print(response.status_code)
print(response.body)
print(response.headers)
Expand All @@ -283,8 +283,8 @@
# Delete a Link Whitelabel #
# DELETE /whitelabel/links/{id} #

id = "test_url_param"
response = sg.client.whitelabel.links._(id).delete()
id_ = "test_url_param"
response = sg.client.whitelabel.links._(id_).delete()
print(response.status_code)
print(response.body)
print(response.headers)
Expand All @@ -293,8 +293,8 @@
# Validate a Link Whitelabel #
# POST /whitelabel/links/{id}/validate #

id = "test_url_param"
response = sg.client.whitelabel.links._(id).validate.post()
id_ = "test_url_param"
response = sg.client.whitelabel.links._(id_).validate.post()
print(response.status_code)
print(response.body)
print(response.headers)
Expand Down
40 changes: 20 additions & 20 deletions test/test_sendgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -2231,25 +2231,25 @@ def test_whitelabel_domains__id__ips_post(self):
data = {
"ip": "192.168.0.1"
}
id = "test_url_param"
id_ = "test_url_param"
headers = {'X-Mock': 200}
response = self.sg.client.whitelabel.domains._(
id).ips.post(request_body=data, request_headers=headers)
id_).ips.post(request_body=data, request_headers=headers)
self.assertEqual(response.status_code, 200)

def test_whitelabel_domains__id__ips__ip__delete(self):
id = "test_url_param"
id_ = "test_url_param"
ip = "test_url_param"
headers = {'X-Mock': 200}
response = self.sg.client.whitelabel.domains._(
id).ips._(ip).delete(request_headers=headers)
id_).ips._(ip).delete(request_headers=headers)
self.assertEqual(response.status_code, 200)

def test_whitelabel_domains__id__validate_post(self):
id = "test_url_param"
id_ = "test_url_param"
headers = {'X-Mock': 200}
response = self.sg.client.whitelabel.domains._(
id).validate.post(request_headers=headers)
id_).validate.post(request_headers=headers)
self.assertEqual(response.status_code, 200)

def test_whitelabel_ips_post(self):
Expand All @@ -2271,24 +2271,24 @@ def test_whitelabel_ips_get(self):
self.assertEqual(response.status_code, 200)

def test_whitelabel_ips__id__get(self):
id = "test_url_param"
id_ = "test_url_param"
headers = {'X-Mock': 200}
response = self.sg.client.whitelabel.ips._(
id).get(request_headers=headers)
id_).get(request_headers=headers)
self.assertEqual(response.status_code, 200)

def test_whitelabel_ips__id__delete(self):
id = "test_url_param"
id_ = "test_url_param"
headers = {'X-Mock': 204}
response = self.sg.client.whitelabel.ips._(
id).delete(request_headers=headers)
id_).delete(request_headers=headers)
self.assertEqual(response.status_code, 204)

def test_whitelabel_ips__id__validate_post(self):
id = "test_url_param"
id_ = "test_url_param"
headers = {'X-Mock': 200}
response = self.sg.client.whitelabel.ips._(
id).validate.post(request_headers=headers)
id_).validate.post(request_headers=headers)
self.assertEqual(response.status_code, 200)

def test_whitelabel_links_post(self):
Expand Down Expand Up @@ -2335,31 +2335,31 @@ def test_whitelabel_links__id__patch(self):
data = {
"default": True
}
id = "test_url_param"
id_ = "test_url_param"
headers = {'X-Mock': 200}
response = self.sg.client.whitelabel.links._(id).patch(
response = self.sg.client.whitelabel.links._(id_).patch(
request_body=data, request_headers=headers)
self.assertEqual(response.status_code, 200)

def test_whitelabel_links__id__get(self):
id = "test_url_param"
id_ = "test_url_param"
headers = {'X-Mock': 200}
response = self.sg.client.whitelabel.links._(
id).get(request_headers=headers)
id_).get(request_headers=headers)
self.assertEqual(response.status_code, 200)

def test_whitelabel_links__id__delete(self):
id = "test_url_param"
id_ = "test_url_param"
headers = {'X-Mock': 204}
response = self.sg.client.whitelabel.links._(
id).delete(request_headers=headers)
id_).delete(request_headers=headers)
self.assertEqual(response.status_code, 204)

def test_whitelabel_links__id__validate_post(self):
id = "test_url_param"
id_ = "test_url_param"
headers = {'X-Mock': 200}
response = self.sg.client.whitelabel.links._(
id).validate.post(request_headers=headers)
id_).validate.post(request_headers=headers)
self.assertEqual(response.status_code, 200)

def test_whitelabel_links__link_id__subuser_post(self):
Expand Down

0 comments on commit deefcd6

Please sign in to comment.