8000 tests and lint passing · SnarkyPapi/server-client-python@f89b1d5 · GitHub
[go: up one dir, main page]

Skip to content

Commit f89b1d5

Browse files
committed
tests and lint passing
1 parent 9a1a43a commit f89b1d5

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

contributing.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,8 @@ somewhere.
5959
> pip install versioneer
6060
> python setup.py build
6161
> python setup.py test
62-
>
62+
>
63+
64+
### before committing
65+
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
66+
> pycodestyle tableauserverclient test samples

samples/explore_webhooks.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ def main():
3030
help='desired logging level (set to error by default)')
3131

3232
args = parser.parse_args()
33-
34-
3533
if args.p is None:
3634
password = getpass.getpass("Password: ")
3735
else:
@@ -80,6 +78,5 @@ def main():
8078
server.webhooks.delete(sample_webhook.id)
8179

8280

83-
8481
if __name__ == '__main__':
8582
main()

tableauserverclient/server/endpoint/webhooks_endpoint.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,3 @@ def test(self, webhook_id):
6161
testOutcome = self.get_request(url)
6262
logger.info('Testing webhook (ID: {0} returned {1})'.format(webhook_id, testOutcome))
6363
return testOutcome
64-

test/test_webhook.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def test_request_factory(self):
7777
webhook_item = WebhookItem()
7878
webhook_item._set_values("webhook-id", "webhook-name", "url", "api-event-name",
7979
None)
80-
webhook_request_actual = '{}\r\n'.format(RequestFactory.Webhook.create_req(webhook_item).decode('utf-8'))
80+
webhook_request_actual = '{}\n'.format(RequestFactory.Webhook.create_req(webhook_item).decode('utf-8'))
8181
self.maxDiff = None
82-
self.assertEqual(webhook_request_expected, webhook_request_actual)
82+
# windows does /r/n for linebreaks, remove the extra char if it is there
83+
self.assertEqual(webhook_request_expected.replace('\r', ''), webhook_request_actual)

0 commit comments

Comments
 (0)
0