testsuite

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: AGPL-3.0 Imports: 11 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{})

AssertQueryCount can be used to assert that a query returns the expected number of

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 returns a redis connection, Close() should be called on it when done

func RP

func RP() *redis.Pool

RP returns a redis pool to our test database

func Reset

func Reset() (context.Context, *sqlx.DB, *redis.Pool)

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

mailroom_test.dump can be regenerated by running:

% python manage.py mailroom_db

then copying the mailroom_test.dump file to your mailroom root directory

% cp mailroom_test.dump ../mailroom

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