Skip to content

Commit 735a3f7

Browse files
authored
Misc session tutorial app fixes (GoogleCloudPlatform#245)
1 parent 377e2c6 commit 735a3f7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

sessions/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START getting_started_sessions_all]
1516
import random
1617
from uuid import uuid4
1718

@@ -60,7 +61,7 @@ def get_session_data(transaction, session_id):
6061

6162
@app.route('/', methods=['GET'])
6263
def home():
63-
template = '<body>{} views for {}</body>'
64+
template = '<body>{} views for "{}"</body>'
6465

6566
transaction = db.transaction()
6667
session = get_session_data(transaction, request.cookies.get('session_id'))
@@ -76,3 +77,4 @@ def home():
7677

7778
if __name__ == '__main__':
7879
app.run(host='127.0.0.1', port=8080)
80+
# [END getting_started_sessions_all]

sessions/main_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_session(client):
4343
data = r.data.decode('utf-8')
4444
assert '1 views' in data
4545

46-
match = re.search('views for ([A-Za-z ]+)', data)
46+
match = re.search('views for "([A-Za-z ]+)"', data)
4747
assert match is not None
4848
greeting = match.group(1)
4949

0 commit comments

Comments
 (0)