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

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

Issue 2302743002: Interface update, per-method Contexts. (Closed)
Patch Set: 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
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..5639560b91bea8f8cf486b630fb32753b1f8e7e9 100644
--- a/docs/present/lightning/gae_test.go
+++ b/docs/present/lightning/gae_test.go
@@ -18,12 +18,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}})
})
}

Powered by Google App Engine
This is Rietveld 408576698