MCPcopy Create free account
hub / github.com/RaymondCode/simple-demo / newExpect

Function newExpect

test/common.go:13–22  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11var testUserB = "douyinTestUserB"
12
13func newExpect(t *testing.T) *httpexpect.Expect {
14 return httpexpect.WithConfig(httpexpect.Config{
15 Client: http.DefaultClient,
16 BaseURL: serverAddr,
17 Reporter: httpexpect.NewAssertReporter(t),
18 Printers: []httpexpect.Printer{
19 httpexpect.NewDebugPrinter(t, true),
20 },
21 })
22}
23
24func getTestUserToken(user string, e *httpexpect.Expect) (int, string) {
25 registerResp := e.POST("/douyin/user/register/").

Callers 7

TestRelationFunction · 0.85
TestChatFunction · 0.85
TestFavoriteFunction · 0.85
TestCommentFunction · 0.85
TestFeedFunction · 0.85
TestUserActionFunction · 0.85
TestPublishFunction · 0.85

Calls

no outgoing calls

Tested by 7

TestRelationFunction · 0.68
TestChatFunction · 0.68
TestFavoriteFunction · 0.68
TestCommentFunction · 0.68
TestFeedFunction · 0.68
TestUserActionFunction · 0.68
TestPublishFunction · 0.68