testsuite

package
v0.0.73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2018 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertQueryCount added in v0.0.17

func AssertQueryCount(t *testing.T, db *sqlx.DB, sql string, args []interface{}, count int, errMsg ...interface{})

func CTX

func CTX() context.Context

CTX returns our background testing context

func DB

func DB() *sqlx.DB

DB returns an open test database pool

func RC

func RC() redis.Conn

RC return a redis connection. Close should be called on it when complete

func RP

func RP() *redis.Pool

RP returns a redis pool to our test database

func Reset

func Reset()

Reset clears out both our database and redis DB

func ResetDB

func ResetDB()

ResetDB resets our database to our base state from our RapidPro dump

temba.dump can be regenerated by running:

% python manage.py migrate
% python manage.py test_db generate --seed 1337
% pg_dump -F c temba > temba.dump

func ResetRP

func ResetRP()

ResetRP resets our redis database

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL