This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| while read line | |
| do | |
| echo "$line" | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo: required | |
| services: | |
| - cassandra | |
| before_script: | |
| - bash travis/setup_cassandra.sh | |
| script: | |
| - ... run test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo: required | |
| services: | |
| - docker | |
| - ... | |
| env: | |
| global: | |
| - IMAGE_NAME=davidemoro/pytest-play | |
| - secure: ... | |
| before_script: | |
| - ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test_data: | |
| - category: dev | |
| - category: movie | |
| - category: food | |
| --- | |
| - type: GET | |
| provider: play_requests | |
| url: https://api.chucknorris.io/jokes/categories | |
| expression: "'dev' in response.json()" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Talk abstract: | |
| * https://www.pycon.it/conference/talks/python-for-testing | |
| Talk agenda | |
| =========== | |
| * why Python and not Java or Javascript | |
| * how to introduce smoothly Python for testing | |
| * create an internal Python learning community | |
| * the importance of cookiecutter scaffolding tools |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Start zalenium with browserstack enabled in daemon mode | |
| ======================================================= | |
| davide@davide-VirtualBox:~/workspaces/pcm2_qa$ docker run --rm -d --name zalenium -p 4444:4444 -e BROWSER_STACK_USER -e BROWSER_STACK_KEY -v /tmp/videos:/home/seluser/videos -v /var/run/docker.sock:/var/run/docker.sock --privileged dosel/zalenium start --browserStackEnabled true | |
| Follow logs (ends unexpectedly) | |
| =============================== | |
| davide@davide-VirtualBox:~/workspaces/pcm2_qa$ docker logs --follow 37e | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| POST /my_index/_search | |
| { | |
| "query" : { | |
| "filtered": { | |
| "query": { | |
| "query_string": { | |
| "query": "public" | |
| } | |
| }, | |
| "filter": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # v3 api | |
| from googlemaps import GoogleMaps | |
| from googlemaps import GoogleMapsError | |
| from googlemaps import fetch_json | |
| GoogleMaps._GEOCODE_QUERY_URL = 'http://maps.googleapis.com/maps/api/geocode/json?' | |
| def geocode(self, query, sensor='false', oe='utf8', ll='', spn='', gl=''): | |
| if (ll is None and spn is not None) or (ll is not None and spn is None): | |
| raise GoogleMapsError('Both ll and spn must be provided.') |