File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ # [START getting_started_sessions_all]
15
16
import random
16
17
from uuid import uuid4
17
18
@@ -60,7 +61,7 @@ def get_session_data(transaction, session_id):
60
61
61
62
@app .route ('/' , methods = ['GET' ])
62
63
def home ():
63
- template = '<body>{} views for {} </body>'
64
+ template = '<body>{} views for "{}" </body>'
64
65
65
66
transaction = db .transaction ()
66
67
session = get_session_data (transaction , request .cookies .get ('session_id' ))
@@ -76,3 +77,4 @@ def home():
76
77
77
78
if __name__ == '__main__' :
78
79
app .run (host = '127.0.0.1' , port = 8080 )
80
+ # [END getting_started_sessions_all]
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ def test_session(client):
43
43
data = r .data .decode ('utf-8' )
44
44
assert '1 views' in data
45
45
46
- match = re .search ('views for ([A-Za-z ]+)' , data )
46
+ match = re .search ('views for " ([A-Za-z ]+)" ' , data )
47
47
assert match is not None
48
48
greeting = match .group (1 )
49
49
You can’t perform that action at this time.
0 commit comments