File: instance_classic.go

package info (click to toggle)
golang-google-appengine 1.0.0-2~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 1,456 kB
  • sloc: sh: 22; makefile: 4
file content (21 lines) | stat: -rw-r--r-- 587 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// +build appengine

package aetest

import "appengine/aetest"

// NewInstance launches a running instance of api_server.py which can be used
// for multiple test Contexts that delegate all App Engine API calls to that
// instance.
// If opts is nil the default values are used.
func NewInstance(opts *Options) (Instance, error) {
	aetest.PrepareDevAppserver = PrepareDevAppserver
	var aeOpts *aetest.Options
	if opts != nil {
		aeOpts = &aetest.Options{
			AppID: opts.AppID,
			StronglyConsistentDatastore: opts.StronglyConsistentDatastore,
		}
	}
	return aetest.NewInstance(aeOpts)
}