41d7204fcc62d0d820617253c353406630bcea0a,appengine/standard/firebase/firetactoe/firetactoe_test.py,,test_opened,#Any#Any#,111
Before Change
app.post("/opened?g=razem", status=200)
assert mock_http.request_url.startswith(
"http://firebase.com/test-db-url/channels/")
assert mock_http.request_method == "PATCH"
def test_bad_move(app, monkeypatch):
After Change
def test_opened(app, monkeypatch):
with mock.patch(
"google.auth.transport.requests.AuthorizedSession.request", autospec=True
) as auth_session:
data = {"access_token": "123"}
auth_session.return_value = MockResponse(data, http_client.OK)
firetactoe.Game(id="razem", userX=users.get_current_user()).put()
app.post("/opened?g=razem", status=200)
auth_session.assert_called_once_with(
mock.ANY, // AuthorizedSession object
method="PATCH",
url="http://firebase.com/test-db-url/channels/38razem.json",
body="{"winner": null, "userX": "38", "moveX": null, "winningBoard": null, "board": null, "userO": null}",
data=None,
)
def test_bad_move(app, monkeypatch):
with mock.patch(
"google.auth.transport.requests.AuthorizedSession.request", autospec=True
) as auth_session:
In pattern: SUPERPATTERN
Frequency: 7
Non-data size: 9
Instances
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 41d7204fcc62d0d820617253c353406630bcea0a
Time: 2020-05-13
Author: 8822365+busunkim96@users.noreply.github.com
File Name: appengine/standard/firebase/firetactoe/firetactoe_test.py
Class Name:
Method Name: test_opened
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 41d7204fcc62d0d820617253c353406630bcea0a
Time: 2020-05-13
Author: 8822365+busunkim96@users.noreply.github.com
File Name: appengine/standard/firebase/firetactoe/firetactoe_test.py
Class Name:
Method Name: test_move
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 41d7204fcc62d0d820617253c353406630bcea0a
Time: 2020-05-13
Author: 8822365+busunkim96@users.noreply.github.com
File Name: appengine/standard/firebase/firetactoe/firetactoe_test.py
Class Name:
Method Name: test_delete
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 41d7204fcc62d0d820617253c353406630bcea0a
Time: 2020-05-13
Author: 8822365+busunkim96@users.noreply.github.com
File Name: appengine/standard/firebase/firetactoe/firetactoe_test.py
Class Name:
Method Name: test_index_existing_game
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 41d7204fcc62d0d820617253c353406630bcea0a
Time: 2020-05-13
Author: 8822365+busunkim96@users.noreply.github.com
File Name: appengine/standard/firebase/firetactoe/firetactoe_test.py
Class Name:
Method Name: test_index_new_game
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 41d7204fcc62d0d820617253c353406630bcea0a
Time: 2020-05-13
Author: 8822365+busunkim96@users.noreply.github.com
File Name: appengine/standard/firebase/firetactoe/firetactoe_test.py
Class Name:
Method Name: test_index_nonexisting_game
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 41d7204fcc62d0d820617253c353406630bcea0a
Time: 2020-05-13
Author: 8822365+busunkim96@users.noreply.github.com
File Name: appengine/standard/firebase/firetactoe/firetactoe_test.py
Class Name:
Method Name: test_bad_move