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
| <!-- importing require first for notebook environments that don't have it --> | |
| <script src="https://requirejs.org/docs/release/2.3.6/minified/require.js"></script> | |
| <div id="graph" style="text-align: center;"></div> | |
| <script> | |
| // Using require since that way it should work with all notebook environments | |
| require.config({ | |
| 'paths': { | |
| d3: '//d3js.org/d3.v5.min', | |
| 'd3-interpolate': '//d3js.org/d3-interpolate.v2', |
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
| <!-- importing require first for notebook environments that don't have it --> | |
| <script src="https://requirejs.org/docs/release/2.3.6/minified/require.js"></script> | |
| <div id="graph" style="text-align: center;"></div> | |
| <script> | |
| // Using require since that way it should work with all notebook environments | |
| require.config({ | |
| 'paths': { | |
| d3: '//d3js.org/d3.v5.min', | |
| 'd3-interpolate': '//d3js.org/d3-interpolate.v2', |
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
| from unittest.mock import MagicMock, patch | |
| import json | |
| from json import JSONEncoder | |
| from typing import List, Type | |
| import requests | |
| from pytest import fixture | |
| from pytest_locker import Locker | |
| from _pytest.fixtures import FixtureRequest |
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
| FROM python:latest | |
| COPY .htpasswd "/.htpasswd" | |
| RUN python3 -m pip install --upgrade pip | |
| RUN pip3 install pypiserver[passlib] | |
| RUN apt-get update | |
| RUN apt-get install lsb-release -y dos2unix | |
| RUN echo "deb http://packages.cloud.google.com/apt gcsfuse-buster main" | \ | |
| tee /etc/apt/sources.list.d/gcsfuse.list |
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
| @patch.object(XyzAPI, "XyzCall") | |
| def test_contact_routing(mock: MagicMock, locker: Locker): | |
| do_logic_that_calls_xyz() | |
| # Uses json to serialize response | |
| # call_args_list contains the data for all calls that XyzApi.XyzCall got | |
| # indent=2 for readibility | |
| # sort_keys=True for deterministic serialization of dictionaries. | |
| locker.lock(json.dumps(mock.call_args_list, indent=2, sort_keys=True)) |
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
| # templates/welcome.jinja, i.e. the template used in the test. | |
| Hi {{user.name}}, | |
| Welcome to this test. | |
| Kind regards, | |
| Tester |
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
| system: | |
| greeting: | |
| name: Greeting | |
| text: Welcome to your launchpad for all things Google IO? | |
| note: YOU MIGHT WANT TO ADD RANDOM NOTES THAT SHOULD NOT BE VISIBLE IN THE GRAPH. | |
| todo: Turn the text into a real sentence! | |
| to: | |
| - pre-io | |
| - ask-attending | |
| - post-io |