utt

package
v0.0.0-...-eec7a18 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ORM                      *gorm.DB                   // 测试用 ORM 对象
	HttpTestResponseRecorder *httptest.ResponseRecorder // Http 上下文
	GinTestContext           *gin.Context               // Gin 上下文
	FakePhoneCount           uint                       // 假号码生成计数,可以有效防止生成重复的号码
)

Functions

func CloseORM

func CloseORM()

CloseORM 单元测试工具 关闭 ORM

func CreatORM

func CreatORM()

CreatORM 单元测试工具 创建 ORM

func GetFakePhone

func GetFakePhone() string

GetFakePhone 单元测试工具 获取测试用的非重复假号码

func InitORM

func InitORM()

InitORM 单元测试工具 初始化 ORM

func InitTest

func InitTest()

InitTest 单元测试工具 初始化测试数据并创建测试上下文

func ResetContext

func ResetContext()

ResetContext 单元测试工具 重置上下文

Types

This section is empty.

Jump to

Keyboard shortcuts

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