Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] set a custom user agent for python requests #2380

Merged
merged 2 commits into from
Dec 9, 2016

Conversation

ltclm
Copy link
Contributor

@ltclm ltclm commented Dec 8, 2016

replace get with head requests
set custom user agent
set height service url to root

Testlink

@ltclm ltclm assigned gjn Dec 8, 2016
@ltclm ltclm force-pushed the dev_ltclm_fix_user_agent branch from 379f09d to c98a4f4 Compare December 8, 2016 19:44
@gjn
Copy link
Contributor

gjn commented Dec 8, 2016

Code looks good to me. Tested.

@gjn
Copy link
Contributor

gjn commented Dec 8, 2016

@loicgasser Why does build fail?

@ltclm
Copy link
Contributor Author

ltclm commented Dec 8, 2016

i have integrated gwr address data today from gdwh, apparently the gdwh copy of the bfs data has the shortened version of street names, this is breaking most of address search tests. i will revert this import and ask the gdwh to change their data import script.

@ltclm
Copy link
Contributor Author

ltclm commented Dec 8, 2016

jenkins test

@ltclm
Copy link
Contributor Author

ltclm commented Dec 8, 2016

The first test seems to fail because of the user agent blocking -> http status 503.

FAIL: test_resource_exists (chsdi.tests.functional.test_helpers.Test_Helpers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/PR_chsdi3/chsdi/tests/functional/test_helpers.py", line 53, in test_resource_exists
    self.assertTrue(test_result)
AssertionError: False is not true
-------------------- >> begin captured logging << --------------------
requests.packages.urllib3.connectionpool: INFO: Starting new HTTPS connection (1): api3.geo.admin.ch
requests.packages.urllib3.connectionpool: DEBUG: "HEAD / HTTP/1.1" 503 0
--------------------- >> end captured logging << ---------------------

the second test is related to the data content. is it possible to do the tests with prod data?

@ltclm ltclm force-pushed the dev_ltclm_fix_user_agent branch from c98a4f4 to c08d2a3 Compare December 8, 2016 22:00
@ltclm
Copy link
Contributor Author

ltclm commented Dec 9, 2016

jenkins test

@loicgasser
Copy link
Contributor

LGTM thanks for fixing the many errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants