Skip to content

Commit

Permalink
tests and lint passing
Browse files Browse the repository at this point in the history
  • Loading branch information
jacalata committed Nov 25, 2019
1 parent 9a1a43a commit f89b1d5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 5 additions & 1 deletion contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,8 @@ somewhere.
> pip install versioneer
> python setup.py build
> python setup.py test
>
>
### before committing
Our CI runs include a python lint run, so you should run this locally and fix complaints before committing as this will fail your checkin
> pycodestyle tableauserverclient test samples
3 changes: 0 additions & 3 deletions samples/explore_webhooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ def main():
help='desired logging level (set to error by default)')

args = parser.parse_args()


if args.p is None:
password = getpass.getpass("Password: ")
else:
Expand Down Expand Up @@ -80,6 +78,5 @@ def main():
server.webhooks.delete(sample_webhook.id)



if __name__ == '__main__':
main()
1 change: 0 additions & 1 deletion tableauserverclient/server/endpoint/webhooks_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,3 @@ def test(self, webhook_id):
testOutcome = self.get_request(url)
logger.info('Testing webhook (ID: {0} returned {1})'.format(webhook_id, testOutcome))
return testOutcome

5 changes: 3 additions & 2 deletions test/test_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def test_request_factory(self):
webhook_item = WebhookItem()
webhook_item._set_values("webhook-id", "webhook-name", "url", "api-event-name",
None)
webhook_request_actual = '{}\r\n'.format(RequestFactory.Webhook.create_req(webhook_item).decode('utf-8'))
webhook_request_actual = '{}\n'.format(RequestFactory.Webhook.create_req(webhook_item).decode('utf-8'))
self.maxDiff = None
self.assertEqual(webhook_request_expected, webhook_request_actual)
# windows does /r/n for linebreaks, remove the extra char if it is there
self.assertEqual(webhook_request_expected.replace('\r', ''), webhook_request_actual)

0 comments on commit f89b1d5

Please sign in to comment.