Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: docs/present/lightning/gae_test.go

Issue 2302743002: Interface update, per-method Contexts. (Closed)
Patch Set: Lightning talk licenses. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « docs/present/lightning/dummy.go ('k') | docs/present/lightning/native_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: docs/present/lightning/gae_test.go
diff --git a/docs/present/lightning/gae_test.go b/docs/present/lightning/gae_test.go
index 0ffdc5686e91620030f251f17ed56f5ee18ebcc5..b38257366c6a3716de27ab64edaca7db210f301a 100644
--- a/docs/present/lightning/gae_test.go
+++ b/docs/present/lightning/gae_test.go
@@ -1,3 +1,7 @@
+// Copyright 2016 The LUCI Authors. All rights reserved.
+// Use of this source code is governed under the Apache License, Version 2.0
+// that can be found in the LICENSE file.
+
// +build !native_appengine
package demo
@@ -18,12 +22,11 @@ func TestGAE(t *testing.T) {
} // HL
Convey("Put/Get w/ gae", t, func() {
ctx := memory.Use(context.Background())
- ds := datastore.Get(ctx) // get datastore client
- So(ds.Put( // HL
+ So(datastore.Put(ctx, // HL
&Model{"one thing", 10, 20}, // HL
&Model{"or another", 20, 30}), ShouldBeNil) // HL
ms := []*Model{{ID: "one thing"}, {ID: "or another"}}
- So(ds.Get(ms), ShouldBeNil) // HL
+ So(datastore.Get(ctx, ms), ShouldBeNil) // HL
So(ms, ShouldResemble, []*Model{{"one thing", 10, 20}, {"or another", 20, 30}})
})
}
« no previous file with comments | « docs/present/lightning/dummy.go ('k') | docs/present/lightning/native_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698